[cairo] [PATCH] Use the new pixman_glyph_cache_t API that will be in pixman 0.28.0

Chris Wilson chris at chris-wilson.co.uk
Thu May 31 01:06:21 PDT 2012


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);
else
  add(white, glyph, dst);

Or should we rely on pixman doing that reduction? Seems like an easier
task for cairo.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list