[cairo-commit] src/cairo-device.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Fri Jul 29 04:02:25 PDT 2011


 src/cairo-device.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6ec24760b32da5ca1f0a67f6ff344b91f8bc020c
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Jul 5 21:37:40 2011 +0200

    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.

diff --git a/src/cairo-device.c b/src/cairo-device.c
index c640547..fd1ec71 100644
--- a/src/cairo-device.c
+++ b/src/cairo-device.c
@@ -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))


More information about the cairo-commit mailing list