mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 04:58:04 +02:00
[cairo-surface] Return UNSUPPORTED for acquire_(dest|source)_image.
If the backend does not support fallbacks ie backend->acquire_dest_image or backend->acquire_source_image is NULL, then return CAIRO_INT_STATUS_UNSUPPORTED rather than attempt to jump to the NULL hooks.
This commit is contained in:
parent
14454e12d8
commit
643834e7aa
1 changed files with 7 additions and 1 deletions
|
|
@ -931,7 +931,7 @@ _cairo_surface_has_device_transform (cairo_surface_t *surface)
|
|||
* @surface as a source. _cairo_surface_release_source_image() must be called
|
||||
* when finished.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS if a an image was stored in @image_out.
|
||||
* Return value: %CAIRO_STATUS_SUCCESS if an image was stored in @image_out.
|
||||
* %CAIRO_INT_STATUS_UNSUPPORTED if an image cannot be retrieved for the specified
|
||||
* surface. Or %CAIRO_STATUS_NO_MEMORY.
|
||||
**/
|
||||
|
|
@ -942,6 +942,9 @@ _cairo_surface_acquire_source_image (cairo_surface_t *surface,
|
|||
{
|
||||
assert (!surface->finished);
|
||||
|
||||
if (surface->backend->acquire_source_image == NULL)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
return _cairo_surface_set_error (surface,
|
||||
surface->backend->acquire_source_image (surface,
|
||||
image_out, image_extra));
|
||||
|
|
@ -1005,6 +1008,9 @@ _cairo_surface_acquire_dest_image (cairo_surface_t *surface,
|
|||
{
|
||||
assert (!surface->finished);
|
||||
|
||||
if (surface->backend->acquire_dest_image == NULL)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
return _cairo_surface_set_error (surface,
|
||||
surface->backend->acquire_dest_image (surface,
|
||||
interest_rect,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue