[cairo] [PATCH] quartz mask (alpha-only) surfaces

Andrea Canciani ranma42 at gmail.com
Mon Oct 19 09:43:19 PDT 2009


I'm trying to fix some major failures in the quartz backend (in
particular master has some serious problems when rendering glyphs
through the fallback code).
While investigating these problems, I learnt that they probably depend
(at least partly) on an incorrect handling of alpha-only surfaces.
Attached are two patches that fix the previous problem in a couple of
places, even if they don't fix it everywhere (look for "XXX -- should
use CGImageMaskCreate" in cairo-quartz-surface.c).
The first patch fixes the creation of alpha-only quartz bitmap
contexts and makes "alpha-similar" and "smask-image-mask" pass.
The second one improves mask creation for the fixup of unbounded operators.
I'm still having some troubles with surface patterns, in particular it
looks like the pattern transform is applied twice (an ugly hack to
make my test pass is skipping the application of the pattern transform
in _cairo_quartz_surface_paint, but it seems wrong to me, as other
patterns need that transform to be applied). I'd like anybody
knowledgeable about the internals of the backend to explain me what's
really happening.
These changes should be quite safe, but please review and test, if possible.
Thank you
Andrea Canciani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-quartz-Improve-A8-image-handling.patch
Type: application/octet-stream
Size: 2054 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091019/db7500e6/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-quartz-Improve-unbounded-operators-fixup.patch
Type: application/octet-stream
Size: 2213 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091019/db7500e6/attachment-0001.obj 


More information about the cairo mailing list