summaryrefslogtreecommitdiff
path: root/test/mask.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-12-20 18:15:48 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2007-12-20 21:21:32 +0000
commit3bf06c336629d9a485fdb150058897e5a6a30b45 (patch)
tree979bd85b70707deb4e1b88ed8406571ba9a53b01 /test/mask.c
parent643834e7aa3e90678276453439017359ef942c9e (diff)
[test/*] Create new surfaces using the group target.
cairo_get_target() returns the original surface passed to cairo_create(), and not the current destination as required when testing drawing to the same surface using multiple contexts. For completeness we also use the group target when creating similar surfaces within the tests (to check that similar surfaces of similar surfaces also work).
Diffstat (limited to 'test/mask.c')
-rw-r--r--test/mask.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mask.c b/test/mask.c
index 984b82df..14dd8b30 100644
--- a/test/mask.c
+++ b/test/mask.c
@@ -75,7 +75,7 @@ mask_polygon (cairo_t *cr, int x, int y)
cairo_surface_t *mask_surface;
cairo_t *cr2;
- mask_surface = cairo_surface_create_similar (cairo_get_target (cr),
+ mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr),
CAIRO_CONTENT_ALPHA,
WIDTH, HEIGHT);
cr2 = cairo_create (mask_surface);
@@ -199,7 +199,7 @@ draw (cairo_t *cr, int width, int height)
/* Some of our drawing is unbounded, so we draw each test to
* a temporary surface and copy over.
*/
- tmp_surface = cairo_surface_create_similar (cairo_get_target (cr),
+ tmp_surface = cairo_surface_create_similar (cairo_get_group_target (cr),
CAIRO_CONTENT_COLOR_ALPHA,
IMAGE_WIDTH, IMAGE_HEIGHT);
cr2 = cairo_create (tmp_surface);