mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-30 07:00:31 +01:00
[cairo-paginated-surface] Set error on surface for operations done its behalf.
Ensure that the error is propagated to the target surface if we fail whilst performing an operation on its behalf, for example set the size of the paginated surface.
This commit is contained in:
parent
481b88dd6b
commit
3fed79d1c2
1 changed files with 3 additions and 2 deletions
|
|
@ -149,7 +149,7 @@ _cairo_paginated_surface_set_size (cairo_surface_t *surface,
|
|||
width, height);
|
||||
status = cairo_surface_status (paginated_surface->meta);
|
||||
if (status)
|
||||
return status;
|
||||
return _cairo_surface_set_error (surface, status);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -293,7 +293,8 @@ _paint_page (cairo_paginated_surface_t *surface)
|
|||
analysis = _cairo_analysis_surface_create (surface->target,
|
||||
surface->width, surface->height);
|
||||
if (analysis == NULL)
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
return _cairo_surface_set_error (surface->target,
|
||||
CAIRO_STATUS_NO_MEMORY);
|
||||
|
||||
surface->backend->set_paginated_mode (surface->target, CAIRO_PAGINATED_MODE_ANALYZE);
|
||||
status = _cairo_meta_surface_replay_and_create_regions (surface->meta, analysis);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue