[cairo-commit] cairo/src cairo_image_surface.c,1.14,1.15

Carl Worth commit at pdx.freedesktop.org
Sat Aug 14 07:21:59 PDT 2004


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv23785/src

Modified Files:
	cairo_image_surface.c 
Log Message:

        * src/cairo_image_surface.c
        (_cairo_image_surface_set_clip_region): Make a copy of the region
        since pixman is currently taking ownership of it (ugh). Thanks to
        Vladimir Vukicevic <vladimir at pobox.com> and Peter Dennis Bartok
        <peter at novonyx.com>.


Index: cairo_image_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_image_surface.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** cairo_image_surface.c	3 Aug 2004 00:04:00 -0000	1.14
--- cairo_image_surface.c	14 Aug 2004 14:21:56 -0000	1.15
***************
*** 456,460 ****
  				      pixman_region16_t *region)
  {
!     pixman_image_set_clip_region (surface->pixman_image, region);
  
      return CAIRO_STATUS_SUCCESS;
--- 456,473 ----
  				      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);
!     }
  
      return CAIRO_STATUS_SUCCESS;




More information about the cairo-commit mailing list