quartz: be more strict about the behavior of blend operators

Some blend operators have a (small, but potentially noticeable)
different behaviour in Quartz and pixman. Use the Quartz ones only for
the operators which match pixman except for rounding errors.

Fixes:
 - extended-blend
 - extended-blend-alpha
 - extended-blend-mask
 - extended-blend-alpha-mask
 - extended-blend-solid
 - extended-blend-solid-alpha
This commit is contained in:
Andrea Canciani 2015-04-09 00:17:24 +02:00
parent 6210e34771
commit 66bc7b8cb0

View file

@ -508,9 +508,13 @@ _cairo_cgcontext_set_cairo_operator (CGContextRef context, cairo_operator_t op)
/* Quartz doesn't support SATURATE at all. COLOR_DODGE and
* COLOR_BURN in Quartz follow the ISO32000 definition, but cairo
* uses the definition from the Adobe Supplement.
* uses the definition from the Adobe Supplement. Also fallback
* on SOFT_LIGHT and HSL_HUE, because their results are
* significantly different from those provided by pixman.
*/
if (op == CAIRO_OPERATOR_SATURATE ||
op == CAIRO_OPERATOR_SOFT_LIGHT ||
op == CAIRO_OPERATOR_HSL_HUE ||
op == CAIRO_OPERATOR_COLOR_DODGE ||
op == CAIRO_OPERATOR_COLOR_BURN)
{