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

Chris Wilson ickle at kemper.freedesktop.org
Mon Jan 25 01:24:48 PST 2010


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

New commits:
commit 38ba696c483c289c2522b124ca628ef602c12126
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jan 25 09:20:11 2010 +0000

    surface-fallback: We no longer own a reference to the clip surface
    
    _cairo_clip_get_surface() now returns a borrowed reference to the cached
    surface on the clip, so we must not destroy it - as Carlos pointed out
    when he hit the assert:
    
    12:55 < KaL> ickle: cairo-surface.c:595: cairo_surface_destroy:
    Assertion `((*&(&surface->ref_count)->ref_count) > 0)' failed.
    12:56 < KaL> ickle: trying to render any pdf file with poppler glib demo
    after installing cairo from git master
    13:00 < KaL> ickle: well, it seems it has nothing ot do with poppler,
    since it crashes in clearlooks src/clearlooks_draw.c:347

diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index 7cd8dee..9047787 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -274,7 +274,6 @@ _clip_and_composite_combine (cairo_clip_t                  *clip,
 	goto CLEANUP_SURFACE;
 
     _cairo_pattern_init_for_surface (&clip_pattern, clip_surface);
-    cairo_surface_destroy (clip_surface);
 
     /* Combine that with the clip */
     status = _cairo_surface_composite (CAIRO_OPERATOR_DEST_IN,
@@ -501,8 +500,6 @@ _composite_trap_region (cairo_clip_t            *clip,
 	}
 
 	_cairo_pattern_init_for_surface (&mask_pattern, clip_surface);
-	cairo_surface_destroy (clip_surface);
-
 	clip_extents = _cairo_clip_get_extents (clip);
 	mask_x = extents->x - clip_extents->x;
 	mask_y = extents->y - clip_extents->y;


More information about the cairo-commit mailing list