diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2008-08-08 04:03:54 +0000 |
---|---|---|
committer | Ray Johnston <ray.johnston@artifex.com> | 2008-08-08 04:03:54 +0000 |
commit | 7a31db6d4142087d29c17e875ef2de1727b9f8b2 (patch) | |
tree | 02eac60ecef4c95fc444e14cb93c2ff6ece0fd2b /common | |
parent | 9fba7b97823998743e79d686204163ca4ffc622a (diff) |
Fix 'rangecheck in showpage' with NumRenderingThreads>0 if the lines requeested do
not range from 0 forward or height-1 backwards. Bug from customer 531 and 850.
Also fix problems with reversion to non-multithreaded rendering with file and memory
based BAND_LIST_STORAGE.
DETAILS:
The 'clist_get_band_from_thread' logic had a known deficiency if the device did not
request lines ranging from the top or bottom of the page. The fix assumes that the
normal direction is from line 0 forward unless the first line requested is the last
line of the page, setting the lookahead_direction. If a request is made for a band
other than the next one in the expected direction, the lookahead_direction is
reversed and threads are started for the requested band and the bands following in
the new direction. This effectively recovers from an incorrect guess, but since
there is no limit on the number of times that the recovery is performed, also allows
for lines/bands to be requested in arbitrary order.
The customer uses a custom device, but the 'bit' devices were recently enhanced
with -dFirstLine= and -dLastLine= parameters to allow testing.
The re-opening of the clist files was changed to use 'a+' to avoid erasing the
file if multi-threaded rendering was shut down (clist_teardown_render_threads),
and rendering was reverted to single threaded mode.
The memory based clist (BAND_LIST_STORAGE=memory) was supplemented to better
track re-opening and allow for 'a' mode and avoid memory leak of the original
'base' named memfile structure. The customers mentioned above also use the
BAND_LIST_STORAGE=memory for performance reasons (realizing a 10% gain in
throughput over file based clist).
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@8953 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions