summaryrefslogtreecommitdiff
path: root/platform/windows/mupdfwinrt/muctx.cpp
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2015-01-15 13:41:06 -0800
committerMichael Vrhel <michael.vrhel@artifex.com>2015-01-20 11:38:00 -0800
commitfc05b51c2b198dcc5553f6de1b8fb0e22e7d28ae (patch)
tree4ac3d618db05c3d9d140c9d5d22a09ecd9efcc89 /platform/windows/mupdfwinrt/muctx.cpp
parentd4ab3cb0b857699c523272bb192752041c77e5e7 (diff)
downloadmupdf-fc05b51c2b198dcc5553f6de1b8fb0e22e7d28ae.tar.xz
Fix reference counting of display lists in Cache.cpp
Fred Ross-Perry found some issues with the display list counting. This fixes the problems. Also he found a spot where we should have been doing just the page contents as opposed to the page.
Diffstat (limited to 'platform/windows/mupdfwinrt/muctx.cpp')
-rw-r--r--platform/windows/mupdfwinrt/muctx.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/platform/windows/mupdfwinrt/muctx.cpp b/platform/windows/mupdfwinrt/muctx.cpp
index d5c34c80..fbcb01f3 100644
--- a/platform/windows/mupdfwinrt/muctx.cpp
+++ b/platform/windows/mupdfwinrt/muctx.cpp
@@ -648,8 +648,6 @@ status_t muctx::RenderPageMT(void *dlist, void *a_dlist, int page_width, int pag
{
fz_free_device(dev);
fz_drop_pixmap(ctx_clone, pix);
- fz_drop_display_list(ctx_clone, display_list);
- fz_drop_display_list(ctx_clone, annot_displaylist);
}
fz_catch(ctx_clone)
{
@@ -689,11 +687,11 @@ status_t muctx::RenderPage(int page_num, unsigned char *bmp_data, int bmp_width,
bmp_height, bmp_data);
fz_clear_pixmap_with_value(mu_ctx, pix, 255);
dev = fz_new_draw_device(mu_ctx, pix);
- fz_run_page(mu_doc, page, dev, pctm, NULL);
+ fz_run_page_contents(mu_doc, page, dev, pctm, NULL);
fz_annot *annot;
for (annot = fz_first_annot(mu_doc, page); annot; annot = fz_next_annot(mu_doc, annot))
- fz_run_annot(mu_doc, page, annot, dev, &fz_identity, NULL);
+ fz_run_annot(mu_doc, page, annot, dev, pctm, NULL);
}
fz_always(mu_ctx)
{
@@ -879,8 +877,6 @@ status_t muctx::SavePage(char *filename, int page_num, int resolution, int type,
fz_drop_pixmap(mu_ctx, pix);
fz_free_device(dev);
fz_free_page(mu_doc, page);
- if (dlist != NULL)
- fz_drop_display_list(mu_ctx, dlist);
if (out != NULL)
{
fz_close_output(out);