From 7ea99e3a8951e265d1437a77dcfee069de0edf76 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Tue, 9 Sep 2014 16:31:31 -0700 Subject: Rename of winrt to windows due to presence on gsview in this folder. The contents of this folder will contain both winrt and gsview projects which are shared in a common visual studio 2013 solution. --- platform/windows/mupdfwinrt/Cache.h | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 platform/windows/mupdfwinrt/Cache.h (limited to 'platform/windows/mupdfwinrt/Cache.h') diff --git a/platform/windows/mupdfwinrt/Cache.h b/platform/windows/mupdfwinrt/Cache.h new file mode 100644 index 00000000..e8c9801d --- /dev/null +++ b/platform/windows/mupdfwinrt/Cache.h @@ -0,0 +1,38 @@ +#pragma once + +#include +extern "C" { + #include "mupdf/fitz.h" +} + +#define MAX_DISPLAY_CACHE_SIZE 3 + +typedef struct cache_entry_s cache_entry_t; + +struct cache_entry_s +{ + int number; + int width; + int height; + fz_display_list *dlist; + cache_entry_t *next; + cache_entry_t *prev; + int index; +}; + +class Cache +{ +private: + int size; + cache_entry_t *head; + cache_entry_t *tail; + std::mutex cache_lock; + +public: + Cache(void); + ~Cache(void); + void GetSize(int *width, int *height); + fz_display_list* Use(int value, int *width, int *height, fz_context *mu_ctx); + void Add(int value, int width, int height, fz_display_list *dlist, fz_context *mu_ctx); + void Empty(fz_context *mu_ctx); +}; -- cgit v1.2.3