diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-13 10:28:11 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-01-13 10:28:11 +0000 |
commit | 3fed79d1c24f07618243bb197b44a9fd106aebbc (patch) | |
tree | 408af3881fcb2589f69804a3bdc47466a8c74955 /src | |
parent | 481b88dd6b19c267feaf05652974225e86aa8007 (diff) |
[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.
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-paginated-surface.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c index eb9699a4..6af4be6e 100644 --- a/src/cairo-paginated-surface.c +++ b/src/cairo-paginated-surface.c @@ -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); |