mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
show reneding page_indicator only in debug mode
This addresses performance degradation because of two e-ink refreshes introduced by this feature #349
This commit is contained in:
@@ -100,6 +100,7 @@ function Debug(...)
|
||||
end
|
||||
end
|
||||
print("#"..line)
|
||||
return true -- debug enabled
|
||||
end
|
||||
|
||||
-- simple serialization function, won't do uservalues, functions, loops
|
||||
|
||||
@@ -1048,10 +1048,11 @@ function UniReader:drawOrCache(no, preCache)
|
||||
-- #4 goal: we render next page, too. (TODO)
|
||||
|
||||
local pg_w = G_width / ( self.doc:getPages() )
|
||||
local page_indicator = function()
|
||||
fb.bb:invertRect( pg_w*(no-1),0, pg_w,10)
|
||||
fb:refresh(1, pg_w*(no-1),0, pg_w,10)
|
||||
Debug('page_indicator',no)
|
||||
local page_indicator = function()
|
||||
if Debug('page_indicator',no) then
|
||||
fb.bb:invertRect( pg_w*(no-1),0, pg_w,10)
|
||||
fb:refresh(1, pg_w*(no-1),0, pg_w,10)
|
||||
end
|
||||
end
|
||||
page_indicator()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user