diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 554ce25..d85110c 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1581,8 +1581,6 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst, return FALSE; } - if ((blendfn.AlphaFormat & AC_SRC_ALPHA) && blendfn.SourceConstantAlpha != 0xff) - FIXME("Ignoring SourceConstantAlpha %d for AC_SRC_ALPHA\n", blendfn.SourceConstantAlpha); if(dib.dsBm.bmBitsPixel != 32) { FIXME("not a 32 bpp dibsection\n"); @@ -1608,6 +1606,20 @@ BOOL X11DRV_AlphaBlend(X11DRV_PDEVICE *devDst, INT xDst, INT yDst, INT widthDst, { memcpy(dstbits, (char *)dib.dsBm.bmBits + y * dib.dsBm.bmWidthBytes + xSrc * 4, widthSrc * 4); + + if (blendfn.SourceConstantAlpha != 0xff) + { + BYTE *tmpBits = dstbits; + int x; + + for (x = 0; x < widthSrc; x++, tmpBits += 4) + { + tmpBits[0] = tmpBits[0] * blendfn.SourceConstantAlpha / 255; + tmpBits[1] = tmpBits[1] * blendfn.SourceConstantAlpha / 255; + tmpBits[2] = tmpBits[2] * blendfn.SourceConstantAlpha / 255; + tmpBits[3] = tmpBits[3] * blendfn.SourceConstantAlpha / 255; + } + } dstbits += (top_down ? -1 : 1) * widthSrc; } }