diff options
author | Benjamin Otte <otte@redhat.com> | 2010-05-28 16:19:12 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-06-07 13:37:48 +0200 |
commit | 92d7b1eee96e6b1448aaf3c95a44238fa0eeff48 (patch) | |
tree | 99f974ed84e0927cefeb1b88331eb66eab734930 /src/cairo-device.c | |
parent | 63e3cf3888d5b55295a04c4af28e876c04245b85 (diff) | |
download | cairo-92d7b1eee96e6b1448aaf3c95a44238fa0eeff48.tar.gz |
device: Make flush vfunc return a cairo_status_t
Mirror the behavior of the surface flush vfunc: Make it return a status
and if it's an error set it on the device.
Diffstat (limited to 'src/cairo-device.c')
-rw-r--r-- | src/cairo-device.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cairo-device.c b/src/cairo-device.c index f8a499e3b..a090f5b5a 100644 --- a/src/cairo-device.c +++ b/src/cairo-device.c @@ -150,11 +150,16 @@ cairo_device_status (cairo_device_t *device) void cairo_device_flush (cairo_device_t *device) { + cairo_status_t status; + if (device == NULL || device->status) return; - if (device->backend->flush != NULL) - device->backend->flush (device); + if (device->backend->flush != NULL) { + status = device->backend->flush (device); + if (unlikely (status)) + status = _cairo_device_set_error (device, status); + } } slim_hidden_def (cairo_device_flush); |