mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-01 19:38:03 +02:00
[test/source-clip] Propagate error.
Use cairo_get_target() to propagate error from the secondary context.
This commit is contained in:
parent
f86f233b3e
commit
6cdbd132ce
1 changed files with 2 additions and 2 deletions
|
|
@ -49,6 +49,7 @@ draw (cairo_t *cr, int width, int height)
|
|||
SIZE, SIZE);
|
||||
|
||||
cr2 = cairo_create (source);
|
||||
cairo_surface_destroy (source);
|
||||
|
||||
/* Fill the source surface with green */
|
||||
cairo_set_source_rgb (cr2, 0, 1, 0);
|
||||
|
|
@ -69,11 +70,10 @@ draw (cairo_t *cr, int width, int height)
|
|||
cairo_paint (cr);
|
||||
|
||||
/* Now draw the source surface onto the destination surface */
|
||||
cairo_set_source_surface (cr, source, 0, 0);
|
||||
cairo_set_source_surface (cr, cairo_get_target (cr2), 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr2);
|
||||
cairo_surface_destroy (source);
|
||||
|
||||
return CAIRO_TEST_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue