Re: [PATCH] Use the new pixman_glyph_cache_t API that will be in pixman 0.28.0
Behdad Esfahbod <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On 05/31/2012 04:06 AM, Chris Wilson wrote: > On Thu, 31 May 2012 06:18:16 +0200, [email protected] (=?utf-8?Q?S=C3=B8ren?= Sandmann) wrote: >> Behdad Esfahbod <[email protected]> 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. 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? behdad -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo