Don't read and copy 32 Bit blocks, but only 24 Bit according to

24BPP_Put_/Get_Pixel.
Fixes NtGdiAlphaBlend in 24 Bit mode, see bug #3708.

svn path=/trunk/; revision=36548
This commit is contained in:
Gregor Schneider
2008-09-27 16:56:14 +00:00
parent d9a95f3658
commit a26186ece3
@@ -661,11 +661,14 @@ DIB_24BPP_AlphaBlend(SURFOBJ* Dest, SURFOBJ* Source, RECTL* DestRect,
Alpha = ((BlendFunc.AlphaFormat & AC_SRC_ALPHA) != 0) ?
SrcPixel.col.alpha : BlendFunc.SourceConstantAlpha;
DstPixel.ul = *Dst;
/* copy only 24bits of dst */
DstPixel.ul = *(PUSHORT)(Dst) + (*(Dst+2) << 16);
DstPixel.col.red = Clamp8(DstPixel.col.red * (255 - Alpha) / 255 + SrcPixel.col.red);
DstPixel.col.green = Clamp8(DstPixel.col.green * (255 - Alpha) / 255 + SrcPixel.col.green);
DstPixel.col.blue = Clamp8(DstPixel.col.blue * (255 - Alpha) / 255 + SrcPixel.col.blue);
*Dst = DstPixel.ul;
/* copy back 24bits of result */
*(PUSHORT)(Dst) = (USHORT)(DstPixel.ul & 0xFFFF);
*(Dst + 2) = (UCHAR)((DstPixel.ul >> 16) & 0xFF);
Dst = (PUCHAR)((ULONG_PTR)Dst + 3);
}
Dst = (PUCHAR)((ULONG_PTR)Dst + DstDelta);