mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge branch 'new_ui_code' of github.com:hwhw/kindlepdfviewer into hint_page_fix
Conflicts: frontend/document/document.lua
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user