mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-07 07:28:02 +02:00
test-meta-surface: Add missing checks for errors from _cairo_meta_surface_replay
This commit is contained in:
parent
ec1fc93125
commit
866b2296b4
1 changed files with 8 additions and 2 deletions
|
|
@ -144,11 +144,14 @@ static cairo_int_status_t
|
|||
_test_meta_surface_show_page (void *abstract_surface)
|
||||
{
|
||||
test_meta_surface_t *surface = abstract_surface;
|
||||
cairo_status_t status;
|
||||
|
||||
if (surface->image_reflects_meta)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
_cairo_meta_surface_replay (surface->meta, surface->image);
|
||||
status = _cairo_meta_surface_replay (surface->meta, surface->image);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
surface->image_reflects_meta = TRUE;
|
||||
|
||||
|
|
@ -280,6 +283,7 @@ static cairo_surface_t *
|
|||
_test_meta_surface_snapshot (void *abstract_other)
|
||||
{
|
||||
test_meta_surface_t *other = abstract_other;
|
||||
cairo_status_t status;
|
||||
|
||||
/* XXX: Just making a snapshot of other->meta is what we really
|
||||
* want. But this currently triggers a bug somewhere (the "mask"
|
||||
|
|
@ -306,7 +310,9 @@ _test_meta_surface_snapshot (void *abstract_other)
|
|||
extents.width,
|
||||
extents.height);
|
||||
|
||||
_cairo_meta_surface_replay (other->meta, surface);
|
||||
status = _cairo_meta_surface_replay (other->meta, surface);
|
||||
if (status)
|
||||
return (cairo_surface_t*) &_cairo_surface_nil;
|
||||
|
||||
return surface;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue