summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-op-run.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-07-07 15:45:33 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-07-08 17:21:24 +0200
commit7340ec1d3602556a05e6d2e390f3b0e3f16246d9 (patch)
treef6a189417249087cc1c8c6ea285c361582e76280 /source/pdf/pdf-op-run.c
parent81fa4dabe72ac2f872e1c1de069948030a063831 (diff)
downloadmupdf-7340ec1d3602556a05e6d2e390f3b0e3f16246d9.tar.xz
Slim pdf_xobject: remove cached transparency/isolated/knockout fields.
Diffstat (limited to 'source/pdf/pdf-op-run.c')
-rw-r--r--source/pdf/pdf-op-run.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c
index a2b9e35c..02005b57 100644
--- a/source/pdf/pdf-op-run.c
+++ b/source/pdf/pdf-op-run.c
@@ -1222,6 +1222,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf
pdf_obj *resources;
fz_rect xobj_bbox;
fz_matrix xobj_matrix;
+ int transparency;
/* Avoid infinite recursion */
if (xobj == NULL || pdf_mark_obj(ctx, xobj->obj))
@@ -1229,6 +1230,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf
pdf_xobject_bbox(ctx, xobj, &xobj_bbox);
pdf_xobject_matrix(ctx, xobj, &xobj_matrix);
+ transparency = pdf_xobject_transparency(ctx, xobj);
fz_var(cleanup_state);
fz_var(gstate);
@@ -1253,7 +1255,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf
pr->gstate[pr->gparent].ctm = gstate->ctm;
/* apply soft mask, create transparency group and reset state */
- if (xobj->transparency)
+ if (transparency)
{
fz_rect bbox;
bbox = xobj_bbox;
@@ -1267,7 +1269,10 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf
/* Remember that we tried to call fz_begin_group. Even
* if it throws an error, we must call fz_end_group. */
cleanup_state = 2;
- fz_begin_group(ctx, pr->dev, &bbox, xobj->isolated, xobj->knockout, gstate->blendmode, gstate->fill.alpha);
+ fz_begin_group(ctx, pr->dev, &bbox,
+ pdf_xobject_isolated(ctx, xobj),
+ pdf_xobject_knockout(ctx, xobj),
+ gstate->blendmode, gstate->fill.alpha);
gstate->blendmode = 0;
gstate->stroke.alpha = 1;
@@ -1302,7 +1307,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf
pdf_grestore(ctx, pr); /* Remove the clippath */
/* wrap up transparency stacks */
- if (xobj->transparency)
+ if (transparency)
{
if (cleanup_state >= 2)
{