diff options
author | Karl Tomlinson <karlt+@karlt.net> | 2010-07-17 10:39:50 +1200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-07-17 11:29:54 +0100 |
commit | f2fa15680ec3ac95cb68d4957557f06561a7dc55 (patch) | |
tree | 9d78f5d6bd51e4b8128574274fbd4c5d1e1a5d8c /src/cairo-clip.c | |
parent | 33ac2035876aeb9215ca0bdaaeea5265fcee61f8 (diff) | |
download | cairo-f2fa15680ec3ac95cb68d4957557f06561a7dc55.tar.gz |
clip: return empty clip from _cairo_clip_copy_rectangle_list when all_clipped
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29122
Tested by test/get-clip
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-clip.c')
-rw-r--r-- | src/cairo-clip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c index 12dc04d76..f6173c671 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -1499,7 +1499,10 @@ _cairo_clip_copy_rectangle_list (cairo_clip_t *clip, cairo_gstate_t *gstate) int n_rects = 0; int i; - if (clip != NULL && clip->path != NULL) { + if (clip->all_clipped) + goto DONE; + + if (clip->path != NULL) { status = _cairo_clip_get_region (clip, ®ion); if (status == CAIRO_INT_STATUS_NOTHING_TO_DO) { goto DONE; |