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 /test | |
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 'test')
-rw-r--r-- | test/get-clip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/get-clip.c b/test/get-clip.c index 9d6e79690..f0477a1f2 100644 --- a/test/get-clip.c +++ b/test/get-clip.c @@ -83,6 +83,8 @@ check_clip_extents (const cairo_test_context_t *ctx, cairo_clip_extents (cr, &ext_x1, &ext_y1, &ext_x2, &ext_y2); if (ext_x1 == x && ext_y1 == y && ext_x2 == x + width && ext_y2 == y + height) return 1; + if (width == 0.0 && height == 0.0 && ext_x1 == ext_x2 && ext_y1 == ext_y2) + return 1; cairo_test_log (ctx, "Error: %s; clip extents %f,%f,%f,%f should be %f,%f,%f,%f\n", message, ext_x1, ext_y1, ext_x2 - ext_x1, ext_y2 - ext_y1, x, y, width, height); @@ -138,7 +140,8 @@ preamble (cairo_test_context_t *ctx) cairo_save (cr); cairo_clip (cr); rectangle_list = cairo_copy_clip_rectangle_list (cr); - if (! check_count (ctx, phase, rectangle_list, 0)) + if (! check_count (ctx, phase, rectangle_list, 0) || + ! check_clip_extents (ctx, phase, cr, 0, 0, 0, 0)) { goto FAIL; } |