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

leonardo at ghostscript.com leonardo at ghostscript.com
Sat Oct 27 12:55:01 PDT 2007


Author: leonardo
Date: 2007-10-27 12:55:00 -0700 (Sat, 27 Oct 2007)
New Revision: 8326

Modified:
   trunk/gs/src/gxclrast.c
Log:
Banding : Extend clist language with trapezoids, linear color trapezoids and linear color triangles (continued 9).

DETAILS :

Bug 689526 "Regression: performance issues with r8118".

This patch clips triangles an trapezoids with band bbox
during the clist playback. The old code spends much time 
for rasterizes parts that fall outside the band,
espcially if the band height is small.

Also fixed an obsolete comment.
  
EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gxclrast.c
===================================================================
--- trunk/gs/src/gxclrast.c	2007-10-27 18:55:14 UTC (rev 8325)
+++ trunk/gs/src/gxclrast.c	2007-10-27 19:55:00 UTC (rev 8326)
@@ -1459,6 +1459,7 @@
 				    byte colors_mask, i, j, m = 1;
 				    gs_fill_attributes fa;
 				    gs_fixed_rect clip;
+				    fixed hh = int2fixed(swap_axes ? target->width : target->height);
 
 				    if (cbuf.end - cbp < 5 * cmd_max_intsize(sizeof(frac31)))
 					cbp = top_up_cbuf(&cbuf, cbp);
@@ -1470,6 +1471,10 @@
 				    clip.p.y -= y0f;
 				    clip.q.x -= x0f;
 				    clip.q.y -= y0f;
+				    if (clip.p.y < 0)
+					clip.p.y = 0;
+				    if (clip.q.y > hh)
+					clip.q.y = hh;
 				    fa.clip = &clip;
 				    fa.swap_axes = swap_axes;
 				    fa.ht = NULL;
@@ -1496,9 +1501,8 @@
 					code = 0;
 #					endif
 					if (code == 0) {
-					    /* Fixme : The target device didn't fill the trapezoid and
-					       requests a decomposition. Call a code from gxshade6.c 
-					       for subdividing into smaller triangles : */
+					    /* The target device didn't fill the trapezoid and
+					       requests a decomposition. Subdivide into smaller triangles : */
 					    if (pfs.dev == NULL)
 						code = gx_init_patch_fill_state_for_clist(tdev, &pfs, mem);
 					    if (code >= 0) {



More information about the gs-cvs mailing list