Re: [patch] gl: skip using mask surface when source pattern is solid

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.