[cairo] Quartz fixes

Andrea Canciani ranma42 at gmail.com
Mon Nov 9 08:09:15 PST 2009


Here is a patchset to improve the quartz backend. In particular:
0001 fixes pattern painting, as the ctm was changed and not restored.
This can be easily seen in surface-pattern-operator
0002 improves pure-alpha images by using them as masks. This makes
them behave more correctly (as proved by alpha-similar), but
compositing of alpha masks is not fixed by this patch, thus clipping
upon fallback (which relies on IN compositing of pure-alpha similar
surfaces) is not fixed by this one.
0003 fixes nothing, just some code cleanup. Avoids some useless
allocations, align stride as suggested.
0004 fixes compositing of pure-alpha surfaces over coloured surfaces.
Quartz considers them as if they had no colour information, but cairo
requires pure-alpha surfaces to have a "default" black colour
0005 fixes the "unbounded fixup" when stroking. Stroking a dashed path
or a path with (non-identity) transformations was incorrectly fixed
up. See the change in clip-stroke-unbounded (note: this patch alone
doesn't completely fix it as there are also some issues with
compositing)
0006 fixes EXTEND_NONE surface sources when using an operator that is
not surface-bounded. Once more, see surface-pattern-operator (but also
many other tests, like operator-source, whose quartz reference files
are broken)
0007 fixes SATURATE and the blending operators for coloured surfaces
and add special handling for pure-alpha surfaces. Seeclip-operator,
operator, operator-alpha, extended-blend and (if you have it)
operator-alpha-alpha

Please notice that some quartz reference files are broken. I compared
directly to the generic reference in some cases to check if there were
visible differences.

I tried to keep the patches "independent" as in "any subset can be
pushed without requiring the rest", but of course the results of the
combination are different than what happens when applying each one
alone (expecially for 0002 and 0007)
No patch alone fixes everything, but altogether they address many
issues in this backend, in particular they fix clipping in fallback
paths (which I'm hitting since I'm not using quartz-font).
Without these patches text rendering fails in most cases and "new"
blending modes produce incorrect results.
Please review
Thank you
Andrea Canciani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-quartz-Fix-pattern-painting.patch
Type: application/octet-stream
Size: 1068 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091109/7899eddb/attachment-0007.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-quartz-Improve-A8-image-handling.patch
Type: application/octet-stream
Size: 2054 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091109/7899eddb/attachment-0008.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-quartz-Improve-unbounded-operators-fixup.patch
Type: application/octet-stream
Size: 2217 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091109/7899eddb/attachment-0009.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-quartz-Fix-compositing-of-alpha-only-surface-sources.patch
Type: application/octet-stream
Size: 848 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091109/7899eddb/attachment-0010.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-quartz-Fix-stroking-with-unbounded-operator.patch
Type: application/octet-stream
Size: 3827 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091109/7899eddb/attachment-0011.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-quartz-Fix-source-unbounded-compositing-of-surface-s.patch
Type: application/octet-stream
Size: 5090 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091109/7899eddb/attachment-0012.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-quartz-Fix-compositing-operators.patch
Type: application/octet-stream
Size: 10583 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091109/7899eddb/attachment-0013.obj 


More information about the cairo mailing list