device: Flush on a finished device is a no-op

In order to have a behavior which is coherent with that of surfaces,
flushing a finished devices should be a no-op and should not affect
the status of the device.
This commit is contained in:
Andrea Canciani 2011-07-05 21:37:40 +02:00
parent 74a86a76a9
commit 6ec24760b3

View file

@ -256,6 +256,9 @@ cairo_device_flush (cairo_device_t *device)
if (device == NULL || device->status)
return;
if (device->finished)
return;
if (device->backend->flush != NULL) {
status = device->backend->flush (device);
if (unlikely (status))