From c8b699c068c96bf8d8e7181c47246072c74c8460 Mon Sep 17 00:00:00 2001 From: chrox Date: Tue, 8 Jan 2013 16:54:34 +0800 Subject: [PATCH] bugfix: check renderpg hash before hinting page --- frontend/document/document.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/document/document.lua b/frontend/document/document.lua index 5c1bfa60b..ca68c5f97 100644 --- a/frontend/document/document.lua +++ b/frontend/document/document.lua @@ -204,7 +204,11 @@ end -- a hint for the cache engine to paint a full page to the cache -- TODO: this should trigger a background operation function Document:hintPage(pageno, zoom, rotation) - self:renderPage(pageno, nil, zoom, rotation) + local hash_full_page = "renderpg|"..self.file.."|"..pageno.."|"..zoom.."|"..rotation + local tile = Cache:check(hash_full_page) + if not tile then + self:renderPage(pageno, nil, zoom, rotation) + end end --[[