DIB_32BPP_BitBlt: Fix ROP4_SRCCOPY case for 32bpp.
This file is ugly!
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-03 01:18:02 UTC
(rev 15744)
+++ trunk/reactos/subsys/win32k/dib/dib32bpp.c 2005-06-03 01:45:26 UTC
(rev 15745)
@@ -393,9 +393,14 @@
case BMF_24BPP:
break;
case BMF_32BPP:
-
- SrcmaxX =
BltInfo->SourceSurface->sizlBitmap.cx - BltInfo->SourcePoint.x;
- SrcmaxY =
BltInfo->SourceSurface->sizlBitmap.cy - BltInfo->SourcePoint.y;
+ {
+ INT Destdelta;
+ INT Sourcedelta;
+ register PBYTE Destaddr;
+ register PBYTE Srcaddr;
+
+ SrcmaxX = BltInfo->SourceSurface->sizlBitmap.cx -
BltInfo->SourcePoint.x;
+ SrcmaxY =
BltInfo->SourceSurface->sizlBitmap.cy - BltInfo->SourcePoint.y;
/* calc the dst BMP size */
DesmaxX =
BltInfo->DestRect.right - BltInfo->DestRect.left;
@@ -406,19 +411,24 @@
if (DesmaxY > SrcmaxY ) DesmaxY
= SrcmaxY;
/* do blt */
- INT Destdelta =
BltInfo->DestSurface->lDelta;
- INT Sourcedelta =
BltInfo->SourceSurface->lDelta;
- register PBYTE Destaddr =
BltInfo->DestSurface->pvScan0 + BltInfo->DestRect.top * Destdelta +
BltInfo->DestRect.left;
- register PBYTE Srcaddr =
BltInfo->SourceSurface->pvScan0 + BltInfo->SourcePoint.y * Sourcedelta +
BltInfo->SourcePoint.x;
+ Destdelta =
BltInfo->DestSurface->lDelta;
+ Sourcedelta =
BltInfo->SourceSurface->lDelta;
+ Destaddr =
BltInfo->DestSurface->pvScan0 + BltInfo->DestRect.top * Destdelta +
BltInfo->DestRect.left;
+ Srcaddr =
BltInfo->SourceSurface->pvScan0 + BltInfo->SourcePoint.y * Sourcedelta +
BltInfo->SourcePoint.x;
DesmaxX *= 4;
- while (--DesmaxY)
+ if (DesmaxY > 0)
{
- RtlCopyMemory(Destaddr,
Srcaddr, DesmaxX);
- Destaddr += Destdelta;
- Srcaddr += Sourcedelta;
+ do
+ {
+
RtlCopyMemory(Destaddr, Srcaddr, DesmaxX);
+ Destaddr +=
Destdelta;
+ Srcaddr +=
Sourcedelta;
+ }
+ while (--DesmaxY);
}
- break;
+ break;
+ }
default:
break;
Show replies by date