mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 19:58:08 +02:00
observer: Add missing return codes
Upon detecting the user error, supply an error code! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
70cd3b473d
commit
7df7964333
1 changed files with 4 additions and 4 deletions
|
|
@ -1825,10 +1825,10 @@ cairo_surface_observer_elapsed (cairo_surface_t *abstract_surface)
|
|||
cairo_surface_observer_t *surface;
|
||||
|
||||
if (unlikely (CAIRO_REFERENCE_COUNT_IS_INVALID (&abstract_surface->ref_count)))
|
||||
return;
|
||||
return -1;
|
||||
|
||||
if (! _cairo_surface_is_observer (abstract_surface))
|
||||
return;
|
||||
return -1;
|
||||
|
||||
surface = (cairo_surface_observer_t *) abstract_surface;
|
||||
return _cairo_observation_total_elapsed_ns (&surface->log);
|
||||
|
|
@ -1861,10 +1861,10 @@ cairo_device_observer_elapsed (cairo_device_t *abstract_device)
|
|||
cairo_device_observer_t *device;
|
||||
|
||||
if (unlikely (CAIRO_REFERENCE_COUNT_IS_INVALID (&abstract_device->ref_count)))
|
||||
return;
|
||||
return -1;
|
||||
|
||||
if (! _cairo_device_is_observer (abstract_device))
|
||||
return;
|
||||
return -1;
|
||||
|
||||
device = (cairo_device_observer_t *) abstract_device;
|
||||
return _cairo_observation_total_elapsed_ns (&device->log);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue