Re: [patch] gl: skip using mask surface when source pattern is solid
"Henry (Yu) Song - SISA" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <3955FA337689574EB32F94B12A7E6E9E246E0DA3@sisaex01sj> |
Hi, Chris Just want to clarify. For alpha glyph image (generated by antialias_fast/default/good/gray using FT_RENDER_MODE_NORMAL in cairo-ft-font.c), the rendering principal is no difference from mask() operation with alpha-image as mask, except OPERATOR_CLEAR. There needs to be special case for OPERATOR_CLEAR. For rgba image (generated by antialias_subpixel/best) text rendering, it is different from mask(). Please let me know if my understanding is wrong. Thanks Henry ________________________________________ From: Chris Wilson [[email protected]] Sent: Tuesday, October 09, 2012 10:24 AM To: Henry (Yu) Song - SISA; [email protected] Subject: RE: [cairo] [patch] gl: skip using mask surface when source pattern is solid On Tue, 9 Oct 2012 17:06:07 +0000, "Henry (Yu) Song - SISA" <[email protected]> wrote: > Hi, Chris > > I might not be too familiar with traps compositor. Does cairo always use A1/A8 for CAIRO_ANTIALIAS_DEFAULT/FAST/GOOD? I am sure antialias default generate A8 images. For alpha-only image, can we skip using mask surface? There's no hard and fast rule, as the glyph surfaces are generated by freetype more or less irrespective of the font's antialiasing options. So the only presumption that I think is safe is that if antialiasing is disabled then we know that the glyph pixels are either completely opaque or clear, and only under those circumstances can we drop the mask given overlapping glyphs. (Something to check is whether the glyph bounding box is as tight as it should be coming out of freetype.) One thing to think about is whether an antialias hint should override the quality concern (i.e. if the geometry antialias hint was FAST skip the mask). -Chris -- Chris Wilson, Intel Open Source Technology Centre -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo