winex11.drv[2/2]: Support GdiAlphaBlend with
blendfn.AlphaFormat == 0 (fixes bug #9262)
Alexandre Julliard
julliard at winehq.org
Wed Aug 29 05:10:47 CDT 2007
"Mikolaj Zalewski" <mikolajz at google.com> writes:
> @@ -1600,6 +1603,16 @@ #endif
> for(; y >= y2; y--) {
> memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4,
> widthSrc * 4);
> + if (!(blendfn.AlphaFormat & AC_SRC_ALPHA))
> + {
> + int i;
> + RGBQUAD *quad = (RGBQUAD *)dstbits;
> + for (i = 0; i < widthSrc; i++)
> + {
> + quad->rgbReserved = blendfn.SourceConstantAlpha;
> + quad++;
> + }
> + }
It would be nicer to have a separate loop for that case, and do
everything in one go instead of patching up the values after the
copy. Also RGBQUAD is meant for color tables, it's not an appropriate
type for the bitmap data itself.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list