[cairo] [PATCH] Use the new pixman_glyph_cache_t API that will be in pixman 0.28.0
behdad at behdad.org
Thu May 31 05:43:08 PDT 2012
On 05/31/2012 04:06 AM, Chris Wilson wrote:
> On Thu, 31 May 2012 06:18:16 +0200, sandmann at cs.au.dk (=?utf-8?Q?S=C3=B8ren?= Sandmann) wrote:
>> Behdad Esfahbod <behdad at behdad.org> writes:
>>>> The *current* code - master as of today - doesn't do this, but I do
>>>> remember that the code used to do this, and I agree it's the right thing
>>>> to do.
>>> I see. I see the code is commented out. Not sure where image show_glyphs is
>>> happening these days.
>> It eventually ends up in composite_glyphs() in cairo-image-compositor.c.
>> If you look at composite_glyphs_via_mask() you'll see that when the mask
>> is "upgraded" from a8 to a8r8g8b8, what happens is that first the
>> original a8 mask is SRCed to the new mask (basically losing the
>> content), and then new glyphs are ADDed directly without a white source.
> Oh, we don't get component expansion without the white source. So
> if (glyph->format == mask->format)
> add(glyph, NULL, dst);
> add(white, glyph, dst);
> Or should we rely on pixman doing that reduction? Seems like an easier
> task for cairo.
I'm not following the math very closely here, but old code suggests that using
the white source should work in all cases? What am I missing?
More information about the cairo