From fc05b51c2b198dcc5553f6de1b8fb0e22e7d28ae Mon Sep 17 00:00:00 2001
From: Michael Vrhel <michael.vrhel@artifex.com>
Date: Thu, 15 Jan 2015 13:41:06 -0800
Subject: 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.
---
 platform/windows/mupdfwinrt/Cache.cpp | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'platform/windows/mupdfwinrt/Cache.cpp')

diff --git a/platform/windows/mupdfwinrt/Cache.cpp b/platform/windows/mupdfwinrt/Cache.cpp
index b129710f..d2567bc2 100644
--- a/platform/windows/mupdfwinrt/Cache.cpp
+++ b/platform/windows/mupdfwinrt/Cache.cpp
@@ -22,7 +22,6 @@ void Cache::Empty(fz_context *mu_ctx)
 			cache_entry_t *old_entry = curr_entry;
 			curr_entry = old_entry->next;
 			fz_drop_display_list(mu_ctx, old_entry->dlist);
-			
 			delete old_entry;
 		}
 		this->size = 0;
@@ -76,8 +75,6 @@ void Cache::Add(int value, int width_in, int height_in, fz_display_list *dlist,
 		head = new_entry;
 	}
 	size++;
-	/* We are going to use this item now */
-	fz_keep_display_list(mu_ctx, new_entry->dlist);
 }
 
 fz_display_list* Cache::Use(int value, int *width_out, int *height_out, fz_context *mu_ctx)
@@ -93,7 +90,6 @@ fz_display_list* Cache::Use(int value, int *width_out, int *height_out, fz_conte
 	}
 	if (curr_entry != NULL)
 	{
-		fz_keep_display_list(mu_ctx, curr_entry->dlist);
 		/* Move this to the front */
 		if (curr_entry != head)
 		{
-- 
cgit v1.2.3