[cairo-commit] cairo/src cairo.h,1.27,1.28 cairo_gstate.c,1.30,1.31 cairo_image_surface.c,1.4,1.5 cairo_pen.c,1.11,1.12

Carl Worth commit at pdx.freedesktop.org
Thu Nov 6 12:53:42 PST 2003


Committed by: cworth

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

Modified Files:
	cairo.h cairo_gstate.c cairo_image_surface.c cairo_pen.c 
Log Message:

        * src/cairo.h: Add comment pondering memory management semantics
        of cairo_current_target_surface.

        * src/cairo_pen.c (_cairo_pen_fini): NULL out pen->vertices after
        free.

        * src/cairo_image_surface.c
        (_cairo_image_abstract_surface_destroy): NULL out durface->data
        after free.


Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** cairo.h	4 Nov 2003 03:17:31 -0000	1.27
--- cairo.h	6 Nov 2003 20:53:39 -0000	1.28
***************
*** 491,494 ****
--- 491,496 ----
  cairo_current_matrix (cairo_t *cr, cairo_matrix_t *matrix);
  
+ /* XXX: Need to decide the memory mangement semantics of this
+    function. Should it reference the surface again? */
  extern cairo_surface_t * __external_linkage
  cairo_current_target_surface (cairo_t *cr);

Index: cairo_gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_gstate.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** cairo_gstate.c	4 Nov 2003 18:46:45 -0000	1.30
--- cairo_gstate.c	6 Nov 2003 20:53:39 -0000	1.31
***************
*** 350,353 ****
--- 350,358 ----
  	return NULL;
  
+ /* XXX: Do we want this?
+     if (gstate->surface)
+ 	_cairo_surface_reference (gstate->surface);
+ */
+ 
      return gstate->surface;
  }

Index: cairo_image_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_image_surface.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** cairo_image_surface.c	4 Nov 2003 03:17:31 -0000	1.4
--- cairo_image_surface.c	6 Nov 2003 20:53:39 -0000	1.5
***************
*** 194,199 ****
  	IcImageDestroy (surface->ic_image);
  
!     if (surface->owns_data)
  	free (surface->data);
  
      free (surface);
--- 194,201 ----
  	IcImageDestroy (surface->ic_image);
  
!     if (surface->owns_data) {
  	free (surface->data);
+ 	surface->data = NULL;
+     }
  
      free (surface);

Index: cairo_pen.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_pen.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** cairo_pen.c	23 Oct 2003 14:47:29 -0000	1.11
--- cairo_pen.c	6 Nov 2003 20:53:39 -0000	1.12
***************
*** 116,119 ****
--- 116,121 ----
  {
      free (pen->vertices);
+     pen->vertices = NULL;
+ 
      _cairo_pen_init_empty (pen);
  }





More information about the cairo-commit mailing list