[cairo-commit] cairo/src cairo_win32_surface.c,1.4,1.5

Owen Taylor commit at pdx.freedesktop.org
Thu Feb 24 08:20:16 PST 2005


Committed by: otaylor

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

Modified Files:
	cairo_win32_surface.c 
Log Message:
2005-02-24  Owen Taylor  <otaylor at redhat.com>

	* src/cairo_win32_surface.c (_cairo_win32_surface_destroy): 
	When we created a DC/bitmap pair, delete the DC before
	the Bitmap so that the Bitmap will be released from the
	DC and can be destroyed. (Reported by Hans Breuer)

	* configure.in cairo.pc.in: Only require fontconfig
	if building FreeType font backend.

	* configure.in: Fix output when reporting Win32 font backend.

Index: cairo_win32_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_win32_surface.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cairo_win32_surface.c	3 Feb 2005 02:57:40 -0000	1.4
+++ cairo_win32_surface.c	24 Feb 2005 16:20:14 -0000	1.5
@@ -240,12 +240,12 @@
     if (bitmap_info && num_palette > 2)
 	free (bitmap_info);
 
-    if (bitmap)
-	DeleteObject (bitmap);
-    
     if (dc)
 	DeleteDC (dc);
     
+    if (bitmap)
+	DeleteObject (bitmap);
+    
     return status;
 }
 
@@ -350,8 +350,10 @@
     if (surface->saved_clip)
 	DeleteObject (surface->saved_clip);
 
-    if (surface->bitmap)
+    if (surface->bitmap) {
+	DeleteDC (surface->dc);
 	DeleteObject (surface->bitmap);
+    }
 
     free (surface);
 }




More information about the cairo-commit mailing list