Merge branch 'new_ui_code' of github.com:hwhw/kindlepdfviewer into hint_page_fix

Conflicts:
	frontend/document/document.lua
This commit is contained in:
Qingping Hou
2013-01-09 11:38:49 +08:00
3 changed files with 12 additions and 7 deletions

View File

@@ -204,7 +204,10 @@ 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, render_mode)
self:renderPage(pageno, nil, zoom, rotation, render_mode)
local hash_full_page = "renderpg|"..self.file.."|"..pageno.."|"..zoom.."|"..rotation.."|"..render_mode
if not Cache:check(hash_full_page) then
self:renderPage(pageno, nil, zoom, rotation, render_mode)
end
end
--[[
@@ -216,8 +219,8 @@ Draw page content to blitbuffer.
@rect: visible_area inside document page
--]]
function Document:drawPage(target, x, y, rect, pageno, zoom, rotation, render_mode)
local hash_full_page = "renderpg|"..self.file.."|"..pageno.."|"..zoom.."|"..rotation
local hash_excerpt = "renderpg|"..self.file.."|"..pageno.."|"..zoom.."|"..rotation.."|"..tostring(rect)
local hash_full_page = "renderpg|"..self.file.."|"..pageno.."|"..zoom.."|"..rotation.."|"..render_mode
local hash_excerpt = hash_full_page.."|"..tostring(rect)
local tile = Cache:check(hash_full_page)
if not tile then
tile = Cache:check(hash_excerpt)