[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: winex11.drv[2/2]: Support GdiAlphaBlend with
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2007-08-29 10:10:47
Message-ID: 87hcmiodlk.fsf () wine ! dyndns ! org
[Download RAW message or body]

"Mikolaj Zalewski" <mikolajz@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@winehq.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic