Bug 688836 - A slow rendering of imagemask with a shading color
Summary: A slow rendering of imagemask with a shading color
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Windows XP
: P4 normal
Assignee: leonardo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-16 02:22 UTC by leonardo
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leonardo 2006-08-16 02:22:00 UTC
The problem happens with rendering the CET test 09-47L to a raster device. The 
operator 'imagemask' is decomposed into set of rectangles, each of which is 
filled with a shading color. Thus the decomposition of the shading is being 
executed multiple times.

IMHO there are 2 ways for fixing it :

1. When imagemask is rendered with a shading color, convert the mask into the 
clipping device, and then render the shading to the clipping device. Not sure 
whether the clip list is not too big.

2. When imagemask is rendered with a shading color, convert the shading color 
into a bitmap pattern and then render imagemask with the bitmap pattern color. 

In both cases, not sure haow to account the banding.
Comment 1 leonardo 2006-08-16 02:22:40 UTC
Created attachment 2416 [details]
09-47L-.PS

A simplified test case.
Comment 2 leonardo 2006-08-16 02:23:34 UTC
Command line :

gswin32c.exe -r144 -dBATCH 09-47L-.PS
Comment 3 leonardo 2006-08-16 02:32:35 UTC
Another performance flaw appears in the shading decomposition, when the tensor 
poles are flipped. The algorithm decoimposes into thing stripes by one axis, 
but a better way would be a dynamic choice of the decomposition axis.
Comment 4 leonardo 2006-08-16 02:50:34 UTC
One mopre useful optimization is to write "fill_linear_color_triangle" into 
clist as a single record. Now it is decomposed into constant color rectangles.
Comment 5 leonardo 2006-10-31 02:20:30 UTC
Patch to HEAD :
http://ghostscript.com/pipermail/gs-cvs/2006-October/006880.html

Leaving the bug open, because the test case is still slow at 60 dpi. The next 
step should be fixing the comment #3, but maybe it's better to movee it to a 
separate new bug, because it's another issue.
Comment 6 leonardo 2006-11-01 22:36:37 UTC
Another related patch is 
http://ghostscript.com/pipermail/gs-cvs/2006-November/006911.html
Strongly speaking, it is not related to imagemask, but to filling a path. We 
mention it here because it affects same test document.
Comment 7 leonardo 2006-11-01 22:38:00 UTC
Closing the bug now because imagemask issue is over. Other problems mentioned 
here are moved to bug 688969 and to bug 688970.