[cairo-commit] cairo/src cairo-image-surface.c,1.48,1.49

Carl Worth commit at pdx.freedesktop.org
Thu Jul 14 11:45:41 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv11197/src

Modified Files:
	cairo-image-surface.c 
Log Message:

        * src/cairo-image-surface.c:
        (_cairo_image_surface_set_clip_region): Remove the copying of the
        region. This was a workaround for a missing copy bug in libpixman
        that has since been fixed. So now it was just a memory leak.


Index: cairo-image-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-image-surface.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- cairo-image-surface.c	8 Jul 2005 17:12:29 -0000	1.48
+++ cairo-image-surface.c	14 Jul 2005 18:45:39 -0000	1.49
@@ -692,20 +692,7 @@
 _cairo_image_surface_set_clip_region (cairo_image_surface_t *surface,
 				      pixman_region16_t *region)
 {
-    if (region) {
-        pixman_region16_t *rcopy;
-
-        rcopy = pixman_region_create();
-        /* pixman_image_set_clip_region expects to take ownership of the
-         * passed-in region, so we create a copy to give it. */
-	/* XXX: I think that's probably a bug in pixman. But its
-	 * memory management issues need auditing anyway, so a
-	 * workaround like this is fine for now. */
-        pixman_region_copy (rcopy, region);
-        pixman_image_set_clip_region (surface->pixman_image, rcopy);
-    } else {
-        pixman_image_set_clip_region (surface->pixman_image, region);
-    }
+    pixman_image_set_clip_region (surface->pixman_image, region);
 
     return CAIRO_STATUS_SUCCESS;
 }




More information about the cairo-commit mailing list