diff options
author | Karl Tomlinson <karlt+@karlt.net> | 2010-07-17 11:46:25 +1200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-07-17 11:30:51 +0100 |
commit | b79ea8a6cab8bd28aebecf6e1e8229d5ac017264 (patch) | |
tree | e0a1dd2c5fdb10c9ba0d35b91f4070644209152f /src/cairo-clip.c | |
parent | 6a5115901381fe9c81a8a311e267c2a00e2a1d04 (diff) | |
download | cairo-b79ea8a6cab8bd28aebecf6e1e8229d5ac017264.tar.gz |
clip: consider all_clipped in _cairo_clip_get_extents
If the gstate clip in _cairo_gstate_int_clip_extents() has all_clipped
set (and path NULL), then it returns the gstate target extents instead of
an empty rectangle. If the target is infinite, then it says the clip is
unbounded.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29124
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, 5 insertions, 0 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c index f6173c671..77d821477 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -1264,9 +1264,14 @@ _cairo_clip_combine_with_surface (cairo_clip_t *clip, return CAIRO_STATUS_SUCCESS; } +static const cairo_rectangle_int_t _cairo_empty_rectangle_int = { 0, 0, 0, 0 }; + const cairo_rectangle_int_t * _cairo_clip_get_extents (const cairo_clip_t *clip) { + if (clip->all_clipped) + return &_cairo_empty_rectangle_int; + if (clip->path == NULL) return NULL; |