From 848d499f3dab24f2e900bd55d155b7ae7d611e6c Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 3 Jun 2005 00:10:18 +0000 Subject: [PATCH] sorry wrong optimze for black and white fixing the start menu svn path=/trunk/; revision=15742 --- reactos/subsys/win32k/dib/dib32bpp.c | 62 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/reactos/subsys/win32k/dib/dib32bpp.c b/reactos/subsys/win32k/dib/dib32bpp.c index 007b8f40368..76f9717a13a 100644 --- a/reactos/subsys/win32k/dib/dib32bpp.c +++ b/reactos/subsys/win32k/dib/dib32bpp.c @@ -310,15 +310,14 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo) { case ROP4_BLACKNESS: //return(0x00000000); + #ifdef _M_IX86 if (BltInfo->DestRect.left!=0) { - SourceX = (BltInfo->DestRect.right - BltInfo->DestRect.left) ; - if (SourceX<=0) return TRUE; - + SourceX = (BltInfo->DestRect.right - BltInfo->DestRect.left) << 2; for (DestY=BltInfo->DestRect.bottom-1;DestY>=BltInfo->DestRect.top;DestY--) - { + { memset4( (PDWORD) (BltInfo->DestSurface->pvScan0 + DestY * BltInfo->DestSurface->lDelta + BltInfo->DestRect.left), 0x00000000, SourceX); @@ -326,20 +325,21 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo) } else - { - - SourceX = ((BltInfo->DestRect.bottom - BltInfo->DestRect.top) * - BltInfo->DestRect.right) ; + { + SourceX = ((BltInfo->DestRect.bottom - BltInfo->DestRect.top) * + BltInfo->DestRect.right) << 2; + + memset4(BltInfo->DestSurface->pvScan0 + BltInfo->DestRect.top * + BltInfo->DestSurface->lDelta, 0x00000000, SourceX); + - if (SourceX<=0) return TRUE; - memset4( (PDWORD) (BltInfo->DestSurface->pvScan0 + BltInfo->DestRect.top * - BltInfo->DestSurface->lDelta), 0x00000000, SourceX); } -#else - for (DestY=BltInfo->DestRect.bottom-1;DestY>=BltInfo->DestRect.top;DestY--) - { +#else + SourceX = (BltInfo->DestRect.right - BltInfo->DestRect.left) << 2; + for (DestY=BltInfo->DestRect.bottom-1;DestY>=BltInfo->DestRect.top;DestY--) + { DIB_32BPP_HLine(BltInfo->DestSurface, BltInfo->DestRect.bottom, SourceX, DestY, 0x00000000); - } + } #endif return TRUE; @@ -347,13 +347,10 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo) case ROP4_WHITENESS: //return(0xFFFFFFFF); - SourceX = ((BltInfo->DestRect.bottom - BltInfo->DestRect.top) * BltInfo->DestRect.right) ; - if (SourceX<=0) return TRUE; - -#ifdef _M_IX86 - - if ( BltInfo->DestRect.left!=0) - { +#ifdef _M_IX86 + if (BltInfo->DestRect.left!=0) + { + SourceX = (BltInfo->DestRect.right - BltInfo->DestRect.left) << 2; for (DestY=BltInfo->DestRect.bottom-1;DestY>=BltInfo->DestRect.top;DestY--) { memset4( (PDWORD) (BltInfo->DestSurface->pvScan0 + DestY * @@ -361,19 +358,24 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo) BltInfo->DestRect.left), 0xFFFFFFFF, SourceX); } - } + } else - { - memset4( (PDWORD) (BltInfo->DestSurface->pvScan0 + BltInfo->DestRect.top * - BltInfo->DestSurface->lDelta), 0xFFFFFFFF, SourceX); + { + SourceX = ((BltInfo->DestRect.bottom - BltInfo->DestRect.top) * + BltInfo->DestRect.right) << 2; + + memset4(BltInfo->DestSurface->pvScan0 + BltInfo->DestRect.top * + BltInfo->DestSurface->lDelta, 0xFFFFFFFF, SourceX); + + } #else - for (DestY=BltInfo->DestRect.bottom-1;DestY>=BltInfo->DestRect.top;DestY--) - { + SourceX = (BltInfo->DestRect.right - BltInfo->DestRect.left) << 2; + for (DestY=BltInfo->DestRect.bottom-1;DestY>=BltInfo->DestRect.top;DestY--) + { DIB_32BPP_HLine(BltInfo->DestSurface, BltInfo->DestRect.bottom, SourceX, DestY, 0xFFFFFFFF); - } + } #endif - return TRUE; break;