diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-17 20:31:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-18 09:55:07 +0100 |
commit | 0f48cce8d90cf95afcf86d71a932ab4e504b909b (patch) | |
tree | de51a04b3d4300d68a5b4fa47876feb0da1c1d64 /test/source-clip-scale.c | |
parent | 6cdbd132ceba159bb7e3ac5612aa79293b21e95a (diff) |
[test/source-clip-scale] Propagate error.
Use cairo_get_target() to propagate error from secondary context.
Diffstat (limited to 'test/source-clip-scale.c')
-rw-r--r-- | test/source-clip-scale.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/source-clip-scale.c b/test/source-clip-scale.c index 4c556954..6434eb0a 100644 --- a/test/source-clip-scale.c +++ b/test/source-clip-scale.c @@ -48,6 +48,7 @@ draw (cairo_t *cr, int width, int height) CAIRO_CONTENT_COLOR_ALPHA, SIZE, SIZE); cr2 = cairo_create (source); + cairo_surface_destroy (source); /* Fill the source surface with green */ cairo_set_source_rgb (cr2, 0, 1, 0); @@ -74,11 +75,10 @@ draw (cairo_t *cr, int width, int height) /* Now draw the source surface onto the destination with scaling. */ cairo_scale (cr, 2.0, 1.0); - cairo_set_source_surface (cr, source, 0, 0); - cairo_paint (cr); - + cairo_set_source_surface (cr, cairo_get_target (cr2), 0, 0); cairo_destroy (cr2); - cairo_surface_destroy (source); + + cairo_paint (cr); return CAIRO_TEST_SUCCESS; } |