winex11.drv: Add support for AlphaBlend with non-opaque SourceConstantAlpha values.

Peter Urbanec winehq.org at urbanec.net
Mon Jun 2 10:14:19 CDT 2008


Ángel Guzmán Maeso wrote:
> A small change:
> 
> +int x,y;
> +for (x = 0; x < widthSrc; x++, tmpBits += 4)
> +    for(y=0;y<4;y++)
> +        tmpBits[y] = tmpBits[y] * blendfn.SourceConstantAlpha / 255;

I'm not fussed one way or the other, but I can see at least two 
advantages in keeping the original code:

1) It's slightly more obvious that the data we are dealing with is four 
bytes of R, G, B and A - although a comment to that effect would be a 
better solution.

2) Compiler optimisers may do a slightly better job on the already 
unrolled loop.

I'll leave it to Alexandre and co. to pick and choose which version 
makes it in.




More information about the wine-patches mailing list