diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-07-07 16:32:47 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-07-08 17:21:24 +0200 |
commit | a2ee9c141864426708950c047d478ef7b9f0103c (patch) | |
tree | d60c268ebbfc7a190736b35004fb2fff8d184e38 /source | |
parent | 7340ec1d3602556a05e6d2e390f3b0e3f16246d9 (diff) | |
download | mupdf-a2ee9c141864426708950c047d478ef7b9f0103c.tar.xz |
Slim pdf_xobject: remove cached document field.
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-op-run.c | 5 | ||||
-rw-r--r-- | source/pdf/pdf-xobject.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index 02005b57..e74d08f4 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -1223,6 +1223,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf fz_rect xobj_bbox; fz_matrix xobj_matrix; int transparency; + pdf_document *doc; /* Avoid infinite recursion */ if (xobj == NULL || pdf_mark_obj(ctx, xobj->obj)) @@ -1299,7 +1300,9 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf if (!resources) resources = page_resources; - pdf_process_contents(ctx, (pdf_processor*)pr, xobj->document, resources, xobj->obj, NULL); + doc = pdf_get_bound_document(ctx, xobj->obj); + + pdf_process_contents(ctx, (pdf_processor*)pr, doc, resources, xobj->obj, NULL); } fz_always(ctx) { diff --git a/source/pdf/pdf-xobject.c b/source/pdf/pdf-xobject.c index 7eb4552f..e38be70e 100644 --- a/source/pdf/pdf-xobject.c +++ b/source/pdf/pdf-xobject.c @@ -87,7 +87,6 @@ pdf_load_xobject(fz_context *ctx, pdf_document *doc, pdf_obj *dict) form = fz_malloc_struct(ctx, pdf_xobject); FZ_INIT_STORABLE(form, 1, pdf_drop_xobject_imp); - form->document = doc; form->colorspace = NULL; form->obj = NULL; form->iteration = 0; @@ -164,7 +163,6 @@ pdf_new_xobject(fz_context *ctx, pdf_document *doc, const fz_rect *bbox, const f form = fz_malloc_struct(ctx, pdf_xobject); FZ_INIT_STORABLE(form, 1, pdf_drop_xobject_imp); - form->document = doc; form->colorspace = NULL; form->obj = NULL; form->iteration = 0; |