[gs-cvs] rev 6987 - trunk/gs/src

leonardo at ghostscript.com leonardo at ghostscript.com
Fri Aug 11 12:44:12 PDT 2006


Author: leonardo
Date: 2006-08-11 12:44:11 -0700 (Fri, 11 Aug 2006)
New Revision: 6987

Modified:
   trunk/gs/src/gspaint.c
Log:
Fix : gs_fillpage passed a low level color to high level devices.

DETAILS :

This was occasionally detected while working on the bug 688641.
gs_fillpage inaccurately checked whether the device can handle high level colors,
and sometimes passed low level color instead high level color.
It happens so because gx_hld_is_hl_color_available works only after a color is set.

We don't expect a behavior change for pdfwrite, ps2write from this patch, 
because they ignore the initial page fill, which gs_fillpage performs.
Other devices don't handle high level color, so the change doesn't affect them also. 

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gspaint.c
===================================================================
--- trunk/gs/src/gspaint.c	2006-08-11 17:50:36 UTC (rev 6986)
+++ trunk/gs/src/gspaint.c	2006-08-11 19:44:11 UTC (rev 6987)
@@ -67,9 +67,11 @@
     gx_device *dev;
     int code = 0;
     gs_logical_operation_t save_lop;
-    bool hl_color_available = gx_hld_is_hl_color_available((gs_imager_state *)pgs, 
+    bool hl_color_available;
+
+    gx_set_dev_color(pgs);
+    hl_color_available = gx_hld_is_hl_color_available((gs_imager_state *)pgs, 
 						    pgs->dev_color);
-    gx_set_dev_color(pgs);
     dev = gs_currentdevice(pgs);
     /* Fill the page directly, ignoring clipping. */
     /* Use the default RasterOp. */



More information about the gs-cvs mailing list