[PATCH] user32: Create a mask from alpha channel when loading a 32 bpp icon. (v3)

Alexandre Julliard julliard at winehq.org
Tue Aug 21 07:11:27 CDT 2018


Dmitry Timoshkov <dmitry at baikal.ru> writes:

> Alexandre Julliard <julliard at winehq.org> wrote:
>
>> >> I expect it would also cause less code
>> >> duplication to directly create a 1-bpp bitmap.
>> >
>> > What kind of code duplication do you have in mind?
>> 
>> The duplicate setting of biBitCount and the StretchDIBits call. If you
>> generate a 1-bpp mask you can get rid of all that and simply fall
>> through to the normal code path.
>
> With the setting of biBitCount and the StretchDIBits call it's still going
> to be considerably less code than the 1-bpp mask generarion from the 32-bpp
> RGBA bitmap.

I don't see why, it should be about the same amount of code as an 8-bpp
mask, with just a couple of extra shifts and masks.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list