diff options
author | Carl Worth <cworth@cworth.org> | 2005-07-14 11:45:39 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-07-14 11:45:39 +0000 |
commit | 14ea7b583b90142bcec829716a0077d969b847e3 (patch) | |
tree | 03b50377a19a500d49999f8aa3ba4508fcdbc529 | |
parent | 171b053347c83d2a1f234b553510ef3f72f22f29 (diff) | |
download | cairo-14ea7b583b90142bcec829716a0077d969b847e3.tar.gz |
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.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/cairo-image-surface.c | 15 |
2 files changed, 8 insertions, 14 deletions
@@ -1,5 +1,12 @@ 2005-07-14 Carl Worth <cworth@cworth.org> + * 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. + +2005-07-14 Carl Worth <cworth@cworth.org> + * src/cairo-png.c (read_png): Patch memory leak of png_info object. diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 8ee50e48e..209ee8f04 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -692,20 +692,7 @@ cairo_int_status_t _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; } |