gfx/cairo/win32-no-printer-bitblt.patch
author ted.mielczarek@gmail.com
Tue, 24 Jul 2007 18:06:10 -0700
changeset 3891 f410bcb3717c1b7cb953898fccd18fedc078c54d
parent 2248 62f2644c9f7c35fa784a0111d9bec9c60ee4c4e0
permissions -rw-r--r--
bug 380542 - add a Makefile for airbag/src/client stuff. r=bsmedberg

diff -r 0a3ea2430215 gfx/cairo/cairo/src/cairo-win32-surface.c
--- a/gfx/cairo/cairo/src/cairo-win32-surface.c	Fri Jun 08 18:04:18 2007 -0700
+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c	Fri Jun 08 18:06:00 2007 -0700
@@ -476,7 +476,12 @@ _cairo_win32_surface_get_subimage (cairo
 
     status = CAIRO_INT_STATUS_UNSUPPORTED;
 
-    if ((local->flags & CAIRO_WIN32_SURFACE_CAN_BITBLT) &&
+    /* Check for SURFACE_IS_DISPLAY here, because there are a lot
+     * of printer drivers that lie and say they can BitBlt, but
+     * just spit out black instead.
+     */
+    if ((local->flags & CAIRO_WIN32_SURFACE_IS_DISPLAY) &&
+	(local->flags & CAIRO_WIN32_SURFACE_CAN_BITBLT) &&
 	BitBlt (local->dc,
 		0, 0,
 		width, height,