[gs-cvs] rev 8593 - branches/mtrender/src

ray at ghostscript.com ray at ghostscript.com
Sun Mar 9 11:32:16 PDT 2008


Author: ray
Date: 2008-03-09 11:32:16 -0700 (Sun, 09 Mar 2008)
New Revision: 8593

Modified:
   branches/mtrender/src/gdevprn.c
Log:
Fix divide by zero when CLIST_THREADS=1 when page mode rendering caused
by the previous fix.

DETAILS:

The clist_enable_multi_thread_render currently is only valid for 'printer'
devices. Pervious fix prevented it from being used by the pattern-clist,
but doing this in the 'put_params' would occur for page mode as well.
This is the correct place, immediately after the printer device is setup
as a command list. Note that this follows setting the 'procs' so that
the 'get_bits_rectangle' proc can be replaced (if multi-threads are
supported).


Modified: branches/mtrender/src/gdevprn.c
===================================================================
--- branches/mtrender/src/gdevprn.c	2008-03-09 13:34:51 UTC (rev 8592)
+++ branches/mtrender/src/gdevprn.c	2008-03-09 18:32:16 UTC (rev 8593)
@@ -358,6 +358,11 @@
 
 	    if ( code >= 0 || (reallocate && pass > 1) )
 		ppdev->procs = gs_clist_device_procs;
+	    /* 
+	     * Now the device is a clist device, we enable multi-threaded rendering.
+	     * It will remain enabled, but that doesn't really cause any problems.
+	     */
+	    clist_enable_multi_thread_render(pdev);
 	} else {
 	    /* Render entirely in memory. */
 	    gx_device *bdev = (gx_device *)pmemdev;
@@ -695,12 +700,6 @@
     }
     ppdev->space_params = sp;
     ppdev->num_render_threads_requested = nthreads;
-    /* 
-     * We enable multi-threaded rendering here. It will remain
-     * enabled, but that doesn't really cause any problems.
-     */
-    if (nthreads > 0)
-	clist_enable_multi_thread_render(pdev);
 
     /* If necessary, free and reallocate the printer memory. */
     /* Formerly, would not reallocate if device is not open: */



More information about the gs-cvs mailing list