small optimze and bug fix optimze color fill for DIB32_BltBit
Modified: trunk/reactos/subsys/win32k/dib/dib32bpp.c
_____
Modified: trunk/reactos/subsys/win32k/dib/dib32bpp.c
--- trunk/reactos/subsys/win32k/dib/dib32bpp.c 2005-06-04 13:38:48 UTC
(rev 15771)
+++ trunk/reactos/subsys/win32k/dib/dib32bpp.c 2005-06-04 16:09:39 UTC
(rev 15772)
@@ -317,7 +317,7 @@
case ROP4_WHITENESS:
//return(0xFFFFFFFF);
- return DIB32_ColorFill(BltInfo, 0xFFFFFFFF);
+ return DIB32_ColorFill(BltInfo, 0xFFFFFFFF);
break;
case ROP4_SRCCOPY:
@@ -453,7 +453,6 @@
{
ULONG DestX, DestY;
ULONG SourceX, SourceY;
- ULONG Dest;
PULONG DestBits;
ULONG bottom = BltInfo->DestRect.bottom;
@@ -470,9 +469,8 @@
SourceX = BltInfo->SourcePoint.x;
for (DestX = BltInfo->DestRect.left;
DestX < right; DestX++, DestBits++, SourceX++)
{
-
- Dest = *DestBits;
- *DestBits = (Dest |
DIB_GetSource(BltInfo->SourceSurface, SourceX,
+
+ *DestBits = (*DestBits |
DIB_GetSource(BltInfo->SourceSurface, SourceX,
SourceY,
BltInfo->XlateSourceToDest));
}
@@ -487,8 +485,7 @@
case BMF_32BPP:
{
ULONG DestX, DestY;
- ULONG SourceX, SourceY;
- ULONG Dest;
+ ULONG SourceX, SourceY;
PULONG DestBits;
ULONG bottom = BltInfo->DestRect.bottom;
@@ -505,10 +502,8 @@
SourceX = BltInfo->SourcePoint.x;
for (DestX = BltInfo->DestRect.left;
DestX < right; DestX++, DestBits++, SourceX++)
- {
-
- Dest = *DestBits;
- *DestBits = (Dest |
DIB_32BPP_GetPixel(BltInfo->SourceSurface, SourceX, SourceY));
+ {
+ *DestBits = (*DestBits |
DIB_32BPP_GetPixel(BltInfo->SourceSurface, SourceX, SourceY));
}
DestBits = (PULONG)((ULONG_PTR)DestBits +
delta);
@@ -539,8 +534,7 @@
case BMF_24BPP:
{
ULONG DestX, DestY;
- ULONG SourceX, SourceY;
- ULONG Dest;
+ ULONG SourceX, SourceY;
PULONG DestBits;
ULONG bottom = BltInfo->DestRect.bottom;
@@ -559,8 +553,7 @@
for (DestX = BltInfo->DestRect.left;
DestX < right; DestX++, DestBits++, SourceX++)
{
if (SourceX >
BltInfo->SourceSurface->sizlBitmap.cx) break;
-
- Dest = *DestBits;
+
*DestBits =
DIB_GetSource(BltInfo->SourceSurface, SourceX,
SourceY,
BltInfo->XlateSourceToDest);
}
@@ -627,7 +620,7 @@
if (BltInfo->DestRect.left!=0)
{
- SourceX = (BltInfo->DestRect.right -
BltInfo->DestRect.left) << 2;
+ SourceX = (BltInfo->DestRect.right -
BltInfo->DestRect.left) -1;
for
(DestY=BltInfo->DestRect.bottom-1;DestY>=BltInfo->DestRect.top;DestY--)
{
memset4( (PDWORD) (BltInfo->DestSurface->pvScan0
+ DestY *
@@ -635,8 +628,8 @@
BltInfo->DestRect.left), color, SourceX);
}
- } else {
- SourceX = ((BltInfo->DestRect.bottom -
BltInfo->DestRect.top) * BltInfo->DestRect.right);
+ } else {
+ SourceX = ((BltInfo->DestRect.bottom -
BltInfo->DestRect.top) * BltInfo->DestRect.right) -1;
memset4(BltInfo->DestSurface->pvScan0 +
BltInfo->DestRect.top *
BltInfo->DestSurface->lDelta, color,
SourceX);