[cairo-commit] 2 commits - src/cairo-traps-compositor.c src/cairo-xlib-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Feb 22 08:04:25 PST 2012


 src/cairo-traps-compositor.c |    7 +++++--
 src/cairo-xlib-surface.c     |    2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 1b1b1ecc6f4343295aad177d127c95af0a5e8611
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 22 15:57:36 2012 +0000

    traps-compositor: add a missing release()
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-traps-compositor.c b/src/cairo-traps-compositor.c
index cc2235e..146089d 100644
--- a/src/cairo-traps-compositor.c
+++ b/src/cairo-traps-compositor.c
@@ -261,7 +261,7 @@ __clip_to_surface (const cairo_traps_compositor_t *compositor,
 				     CAIRO_COLOR_TRANSPARENT,
 				     &clear);
     if (unlikely (status))
-	goto error;
+	goto error_release;
 
     status = compositor->composite_traps (mask, CAIRO_OPERATOR_ADD, src,
 					  src_x, src_y,
@@ -269,14 +269,17 @@ __clip_to_surface (const cairo_traps_compositor_t *compositor,
 					  extents,
 					  antialias, &traps);
     if (unlikely (status))
-	goto error;
+	goto error_release;
 
+    compositor->release (mask);
     *surface = mask;
 out:
     cairo_surface_destroy (src);
     _cairo_traps_fini (&traps);
     return status;
 
+error_release:
+    compositor->release (mask);
 error:
     cairo_surface_destroy (mask);
     goto out;
commit e5cb567f5d7c87faf09e240fc1649eebf0b1f0f6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 22 15:49:34 2012 +0000

    xlib: Trim the ximage to match the trimming of the intermediate
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 322f929..d8b0272 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1078,6 +1078,8 @@ _cairo_xlib_surface_draw_image (cairo_xlib_surface_t   *surface,
                                   0, 0,
                                   width, height);
 
+	ximage.width = width;
+	ximage.height = height;
 	ximage.bits_per_pixel = image_masks.bpp;
 	ximage.data = (char *) pixman_image_get_data (pixman_image);
 	ximage.bytes_per_line = pixman_image_get_stride (pixman_image);


More information about the cairo-commit mailing list