wined3d: Remove some unneeded source rectangle calculations from BltOverride.

This commit is contained in:
Roderick Colenbrander 2010-03-30 22:19:02 +02:00 committed by Alexandre Julliard
parent 87b5b2f738
commit c6f0ddcb1a
1 changed files with 6 additions and 13 deletions

View File

@ -3817,24 +3817,17 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
/* Check rects - IWineD3DDevice_Present doesn't handle them */ /* Check rects - IWineD3DDevice_Present doesn't handle them */
while(1) while(1)
{ {
RECT mySrcRect;
TRACE("Looking if a Present can be done...\n"); TRACE("Looking if a Present can be done...\n");
/* Source Rectangle must be full surface */ /* Source Rectangle must be full surface */
if( SrcRect ) { if(src_rect.left != 0 || src_rect.top != 0 ||
if(SrcRect->left != 0 || SrcRect->top != 0 || src_rect.right != Src->currentDesc.Width || src_rect.bottom != Src->currentDesc.Height) {
SrcRect->right != Src->currentDesc.Width || SrcRect->bottom != Src->currentDesc.Height) {
TRACE("No, Source rectangle doesn't match\n"); TRACE("No, Source rectangle doesn't match\n");
break; break;
} }
}
mySrcRect.left = 0;
mySrcRect.top = 0;
mySrcRect.right = Src->currentDesc.Width;
mySrcRect.bottom = Src->currentDesc.Height;
/* No stretching may occur */ /* No stretching may occur */
if(mySrcRect.right != dst_rect.right - dst_rect.left || if(src_rect.right != dst_rect.right - dst_rect.left ||
mySrcRect.bottom != dst_rect.bottom - dst_rect.top) { src_rect.bottom != dst_rect.bottom - dst_rect.top) {
TRACE("No, stretching is done\n"); TRACE("No, stretching is done\n");
break; break;
} }