summaryrefslogtreecommitdiff
path: root/test/unbounded-operator.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-10-21 11:29:12 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-10-21 11:31:11 +0100
commit21223cc12ca00c52c0b39dc60db410f29e4e76c9 (patch)
tree5c76d985b2eedb0c429cc19aecac7ab58d944e69 /test/unbounded-operator.c
parent4c8de6d99d337338d6fd57134247515f9815b5e5 (diff)
downloadcairo-21223cc12ca00c52c0b39dc60db410f29e4e76c9.tar.gz
[test/unbounded-operator] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
Diffstat (limited to 'test/unbounded-operator.c')
-rw-r--r--test/unbounded-operator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c
index 043edfd69..25d4345ba 100644
--- a/test/unbounded-operator.c
+++ b/test/unbounded-operator.c
@@ -47,6 +47,7 @@ draw_mask (cairo_t *cr, int x, int y)
CAIRO_CONTENT_ALPHA,
width, height);
cr2 = cairo_create (mask_surface);
+ cairo_surface_destroy (mask_surface);
cairo_save (cr2);
cairo_set_source_rgba (cr2, 0, 0, 0, 0); /* transparent */
@@ -59,11 +60,8 @@ draw_mask (cairo_t *cr, int x, int y)
cairo_arc (cr2, 0.5 * width, 0.5 * height, 0.45 * height, 0, 2 * M_PI);
cairo_fill (cr2);
+ cairo_mask_surface (cr, cairo_get_target (cr2), x, y);
cairo_destroy (cr2);
-
- cairo_mask_surface (cr, mask_surface, x, y);
-
- cairo_surface_destroy (mask_surface);
}
static void