mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-28 11:00:11 +01:00
[test/source-clip-scale] Propagate error.
Use cairo_get_target() to propagate error from secondary context.
This commit is contained in:
parent
6cdbd132ce
commit
0f48cce8d9
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue