[gs-commits] mupdf/master - 0_6-238-g6fa7dc8 - Pass the page resources to softmask xobjects.

Tor Andersson tor at ghostscript.com
Tue Aug 3 12:09:43 UTC 2010


commit 6fa7dc8deb4a6a476a382fff4c49aad6702d6e5d
Author: Tor Andersson <tor at ghostscript.com>
Date:   Fri Jul 30 13:38:28 2010 +0000

    Pass the page resources to softmask xobjects.
    
    Ignore-this: 5af011709eb6f5d3e1be9159b1a627cd
    
    darcs-hash:20100730133828-f546f-a3834dadcef3afab22831b06677e35492c7d1259.gz

 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/mupdf/pdf_build.c b/mupdf/pdf_build.c
index b34e154..9c2bd2c 100644
--- a/mupdf/pdf_build.c
+++ b/mupdf/pdf_build.c
@@ -206,13 +206,17 @@ pdf_showpattern(pdf_csi *csi, pdf_pattern *pat, fz_rect bbox, int what)
 			gstate->ctm = fz_concat(fz_translate(x * pat->xstep, y * pat->ystep), ptm);
 			csi->topctm = gstate->ctm;
 			error = pdf_runcsibuffer(csi, pat->resources, pat->contents);
-			if (error)
-				fz_catch(error, "cannot render pattern tile");
 			while (oldtop < csi->gtop)
 				pdf_grestore(csi);
+			if (error)
+			{
+				fz_catch(error, "cannot render pattern tile");
+				goto cleanup;
+			}
 		}
 	}
 
+cleanup:
 	csi->topctm = oldtopctm;
 
 	pdf_grestore(csi);
diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c
index 62b286a..95f2ed4 100644
--- a/mupdf/pdf_interpret.c
+++ b/mupdf/pdf_interpret.c
@@ -169,7 +169,7 @@ pdf_runxobject(pdf_csi *csi, fz_obj *resources, pdf_xobject *xobj)
 			popmask = 1;
 
 			csi->dev->beginmask(csi->dev->user, bbox, gstate->luminosity, nil, nil);
-			error = pdf_runxobject(csi, nil, softmask);
+			error = pdf_runxobject(csi, resources, softmask);
 			if (error)
 				return fz_rethrow(error, "cannot run softmask");
 			csi->dev->endmask(csi->dev->user);

--
git/hooks/post-receive


More information about the gs-commits mailing list