diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-05-30 20:57:04 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-05-30 21:05:23 +0100 |
commit | 41bef0fc385381b8c6b9091ec7ca2abe04cfc147 (patch) | |
tree | afffbc846a708980178d63117c1a2643f9be5cb9 /src/cairo-composite-rectangles.c | |
parent | 631bf299256e11a17511977f357e0353fb5615f7 (diff) |
traps: Ensure that we correctly clip when using multiple clip boxes
We need to be more careful when trying to discard a clip to be sure that
it is truly not required. In particular, we need to not throw a way a
clip region when it has more than one box intersecting the mask.
Reported-by: Alexander Larsson
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=697357
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-composite-rectangles.c')
-rw-r--r-- | src/cairo-composite-rectangles.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c index c26098af4..e6639d0c3 100644 --- a/src/cairo-composite-rectangles.c +++ b/src/cairo-composite-rectangles.c @@ -167,6 +167,13 @@ _cairo_composite_rectangles_intersect (cairo_composite_rectangles_t *extents, _cairo_clip_get_extents (extents->clip))) return CAIRO_INT_STATUS_NOTHING_TO_DO; + if (! _cairo_rectangle_intersect (&extents->bounded, + _cairo_clip_get_extents (extents->clip)) && + extents->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK) + { + return CAIRO_INT_STATUS_NOTHING_TO_DO; + } + if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID) _cairo_pattern_sampled_area (&extents->source_pattern.base, &extents->bounded, |