[Commit] cairo/src cairo_surface.c,1.11,1.12 cairoint.h,1.22,1.23
Carl Worth
commit at keithp.com
Tue Sep 30 08:59:01 PDT 2003
Committed by: cworth
Update of /local/src/CVS/cairo/src
In directory home.keithp.com:/tmp/cvs-serv14916/src
Modified Files:
cairo_surface.c cairoint.h
Log Message:
Fix to delay XFreePixmap until cairo_surface_destroy.
Index: cairo_surface.c
===================================================================
RCS file: /local/src/CVS/cairo/src/cairo_surface.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cairo_surface.c 29 Sep 2003 18:55:56 -0000 1.11
+++ cairo_surface.c 30 Sep 2003 14:58:58 -0000 1.12
@@ -114,6 +114,7 @@
surface->gc = 0;
surface->drawable = drawable;
+ surface->owns_pixmap = 0;
surface->visual = visual;
if (! XRenderQueryVersion (dpy, &surface->render_major, &surface->render_minor)) {
@@ -207,6 +208,7 @@
surface->gc = 0;
surface->drawable = 0;
+ surface->owns_pixmap = 0;
surface->visual = NULL;
surface->render_major = -1;
surface->render_minor = -1;
@@ -276,7 +278,7 @@
NULL,
format,
DefaultColormap (dpy, scr));
- XFreePixmap (surface->dpy, pix);
+ surface->owns_pixmap = 1;
} else {
char *data;
int stride;
@@ -326,6 +328,9 @@
if (surface->picture)
XRenderFreePicture (surface->dpy, surface->picture);
+ if (surface->owns_pixmap)
+ XFreePixmap (surface->dpy, surface->drawable);
+
if (surface->icformat)
IcFormatDestroy (surface->icformat);
Index: cairoint.h
===================================================================
RCS file: /local/src/CVS/cairo/src/cairoint.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- cairoint.h 29 Sep 2003 15:36:30 -0000 1.22
+++ cairoint.h 30 Sep 2003 14:58:59 -0000 1.23
@@ -249,6 +249,7 @@
GC gc;
Drawable drawable;
Visual *visual;
+ int owns_pixmap;
int render_major;
int render_minor;
More information about the Commit
mailing list