summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-13 09:31:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-13 09:33:12 +0100
commit4741d33cf67409a6fddbc32a5d0c8d68224cd939 (patch)
tree04aec2638b61e39a2e4b39fe56625765b3e0bd25
parentee871940ffe229ed285e618566e45c7d28c5857c (diff)
downloadcairo-4741d33cf67409a6fddbc32a5d0c8d68224cd939.tar.gz
gstate: Don't reduce solid source and mask for SOURCE and CLEAR
Not all operators are created equal, and this optimization breaks for SOURCE and CLEAR where the mask operates on the clip and not the source.
-rw-r--r--src/cairo-gstate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index caed88b5c..78aab5080 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -1113,7 +1113,8 @@ _cairo_gstate_mask (cairo_gstate_t *gstate,
_cairo_gstate_copy_transformed_mask (gstate, &mask_pattern.base, mask);
if (source->type == CAIRO_PATTERN_TYPE_SOLID &&
- mask_pattern.type == CAIRO_PATTERN_TYPE_SOLID)
+ mask_pattern.type == CAIRO_PATTERN_TYPE_SOLID &&
+ _cairo_operator_bounded_by_source (op))
{
const cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) source;
cairo_color_t combined;