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

Chris Wilson ickle at kemper.freedesktop.org
Mon Aug 15 04:08:40 PDT 2011


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

New commits:
commit c715d52af547741f5e57182331ccd566efcd8835
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Aug 15 11:50:44 2011 +0100

    snapshot: restore the order of detach vs callback
    
    Mucking around in 99fa5ff6c211, I tweaked the order to mark the
    snapshot as detached before calling the callback. xcb relies on the old
    ordering so that it can correctly update its fallbacks.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 6851ca9..c325c8a 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -328,12 +328,12 @@ _cairo_surface_detach_snapshot (cairo_surface_t *snapshot)
 {
     assert (snapshot->snapshot_of != NULL);
 
-    if (snapshot->snapshot_detach != NULL)
-	snapshot->snapshot_detach (snapshot);
-
     snapshot->snapshot_of = NULL;
     cairo_list_del (&snapshot->snapshot);
 
+    if (snapshot->snapshot_detach != NULL)
+	snapshot->snapshot_detach (snapshot);
+
     cairo_surface_destroy (snapshot);
 }
 


More information about the cairo-commit mailing list