[gs-cvs] rev 8554 - trunk/gs/lib
leonardo at ghostscript.com
leonardo at ghostscript.com
Wed Feb 27 11:36:18 PST 2008
Author: leonardo
Date: 2008-02-27 11:36:18 -0800 (Wed, 27 Feb 2008)
New Revision: 8554
Modified:
trunk/gs/lib/pdf_draw.ps
trunk/gs/lib/pdf_ops.ps
Log:
Fix (clist interpreter) : Improve transparency performance, step 4a.
DETAILS :
Bug 689708 "Long processing time of PDF file"
Bug 689714 "Severe performance penalty for PDF transparency through to clist"
The last patch is incomplete due to a commitment failure.
The patch completely removes .inittransparencymask because it is noop.
With the test case of the bug 689708 at 144 dpi
with default band size it reduces
the temp file size from 64.8Meg to 36.5 Meg,
and speeds up the rendering in 11 times.
With the test case of the bug 689714 at 144 dpi
with default band size it reduces
the temp file size from 12.0Meg to 3.3 Meg,
and speeds up the rendering in 11 times.
The speed factor depends on resolution.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/lib/pdf_draw.ps
===================================================================
--- trunk/gs/lib/pdf_draw.ps 2008-02-27 19:22:57 UTC (rev 8553)
+++ trunk/gs/lib/pdf_draw.ps 2008-02-27 19:36:18 UTC (rev 8554)
@@ -433,7 +433,6 @@
gsave //nodict begin
null SMask
1 .setopacityalpha 1 .setshapealpha
- 0 .inittransparencymask 1 .inittransparencymask
/Compatible .setblendmode
% Execute the body of the Form, similar to DoForm.
pdfopdict .pdfruncontext
@@ -1080,7 +1079,6 @@
gsave //nodict begin
null /SoftMask gput
1 .setopacityalpha 1 .setshapealpha
- 0 .inittransparencymask 1 .inittransparencymask
/Compatible .setblendmode
DoImage
end grestore
Modified: trunk/gs/lib/pdf_ops.ps
===================================================================
--- trunk/gs/lib/pdf_ops.ps 2008-02-27 19:22:57 UTC (rev 8553)
+++ trunk/gs/lib/pdf_ops.ps 2008-02-27 19:36:18 UTC (rev 8554)
@@ -250,11 +250,11 @@
% Establish a given color (and color space) as current.
/.settransparencyparams { % <alpha> <smask> .settransparencyparams -
PDFusingtransparency {
- /.inittransparencymask where {
+ /.begintransparencygroup where {
pop AlphaIsShape {
- 1 .setopacityalpha 0 .inittransparencymask exch .setshapealpha 1
+ 1 .setopacityalpha exch .setshapealpha 1
} {
- 1 .setshapealpha 1 .inittransparencymask exch .setopacityalpha 0
+ 1 .setshapealpha exch .setopacityalpha 0
} ifelse
% Set the soft mask by rendering the XObject. Doing this every time
% is obviously very inefficient; we'll improve it later.
@@ -269,7 +269,7 @@
/.settransparencymask { % <paramdict> <masknum> .settransparencymask -
exch dup null eq {
PDFusingtransparency {
- pop .inittransparencymask
+ pop pop
} {
dup /Draw get exec
} ifelse
More information about the gs-cvs
mailing list