summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-03-06 08:34:10 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-03-06 08:35:20 +0000
commit3b261bea7d8e8094ff3899aefab6bbc8628a3585 (patch)
tree904cd0fea3c02ca8bdf625ffd8230fa234f84cd8
parent42fdfa812eb05ecb539af739445ec8c36f0e7ac1 (diff)
clip: Do not modify the special all-clipped cairo_clip_t
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75819
-rw-r--r--src/cairo-clip-boxes.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c
index bbb419788..352654f5f 100644
--- a/src/cairo-clip-boxes.c
+++ b/src/cairo-clip-boxes.c
@@ -173,7 +173,7 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip,
clip->extents = *r;
} else {
if (! _cairo_rectangle_intersect (&clip->extents, r))
- clip = _cairo_clip_set_all_clipped (clip);
+ return _cairo_clip_set_all_clipped (clip);
}
if (clip->path == NULL)
clip->is_region = _cairo_box_is_pixel_aligned (box);
@@ -312,10 +312,12 @@ _cairo_clip_intersect_boxes (cairo_clip_t *clip,
_cairo_boxes_extents (boxes, &limits);
_cairo_box_round_to_rectangle (&limits, &extents);
- if (clip->path == NULL)
+ if (clip->path == NULL) {
clip->extents = extents;
- else if (! _cairo_rectangle_intersect (&clip->extents, &extents))
+ } else if (! _cairo_rectangle_intersect (&clip->extents, &extents)) {
clip = _cairo_clip_set_all_clipped (clip);
+ goto out;
+ }
if (clip->region) {
cairo_region_destroy (clip->region);