[Vm-dev] BitBlt looking for rule blitting an alpha mask + constant color

Igor Stasenko siguctua at gmail.com
Fri Jun 19 23:49:54 UTC 2009


Hello,

to what i see, there is no rule, which can use following formula:

result = constanColor * srcAlpha + (destColor * ( 1-srcAlpha))

where scrAlpha is taken from source form, and if source form is 8 bit
depth, it is assumed that form contains no RGB data, only alpha
channel.

A rule 41 is more generic, but requires to convert a source form to
32bpp before blitting :(
Maybe it worth modifying rule 41 to allow 8bit forms?
Or maybe its worth introducing a new one?
What you think?

This new rule is essentially useful for freetype plugin, which
receives an opacity mask from freetype library.
But unfortunately, because we don't have such rule,  we can't use a
bitmap, produced by freetype, directly unless converting it to 32bpp.
Or maybe we can, but looking at freetype font cache code, it seems
that every form is converted to 32bpp before placing in cache.

Being able to operate with 8bpp alpha-masks will reduce a memory
footprint & increase rendering speed considerably.

-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list