[gs-cvs] rev 8240 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Fri Sep 14 03:17:07 PDT 2007
Author: leonardo
Date: 2007-09-14 03:17:07 -0700 (Fri, 14 Sep 2007)
New Revision: 8240
Modified:
trunk/gs/src/gxclpath.c
Log:
Banding : Extend clist language with trapezoids, linear color trapezoids and linear color triangles (continued 8).
DETAILS :
Bug 689436 "pattern rendering regression with revision 8095".
Do not write tile phase to clist before trying to write the color.
If the latter fails, the phase may become wrong due to
overloading cmd_opv_set_tile_phase with tile phase and device halftone phase.
With the test case the old code, when writing a trapezoid to clist,
first writes halftone phase, then fails to write the pattern color
and falls back to gx_default_fill_trapezoid.
The latter writes strip_copy_rop with it own phases.
But the clist reader expects strip_copy_rop phase to be written
*after* the tile header, so the reader misses the phase sychronizm.
The fix simply delays writing the phase after the color is written.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/gxclpath.c
===================================================================
--- trunk/gs/src/gxclpath.c 2007-09-14 05:23:52 UTC (rev 8239)
+++ trunk/gs/src/gxclpath.c 2007-09-14 10:17:07 UTC (rev 8240)
@@ -114,16 +114,6 @@
color_unset(psdc);
}
- /* see if phase informaiton must be inserted in the command list */
- if ( pdcolor->type->get_phase(pdcolor, &color_phase) &&
- (color_phase.x != pcls->tile_phase.x ||
- color_phase.y != pcls->tile_phase.y ) &&
- (code = cmd_set_tile_phase( cldev,
- pcls,
- color_phase.x,
- color_phase.y )) < 0 )
- return code;
-
/*
* Get the device color type index and the required size.
*
@@ -147,6 +137,16 @@
return code;
req_size = dc_size + 2 + 1 + enc_u_sizew(dc_size);
+ /* see if phase informaiton must be inserted in the command list */
+ if ( pdcolor->type->get_phase(pdcolor, &color_phase) &&
+ (color_phase.x != pcls->tile_phase.x ||
+ color_phase.y != pcls->tile_phase.y ) &&
+ (code = cmd_set_tile_phase( cldev,
+ pcls,
+ color_phase.x,
+ color_phase.y )) < 0 )
+ return code;
+
/*
* Encoded device colors are small in comparison to the command
* buffer size (< 64 bytes), so we can just clear space in the
More information about the gs-cvs
mailing list