no need to do full screen refresh when outof screensaver

since there is already one by the native system
pull/1647/head
chrox 9 years ago
parent e91b7bd266
commit 4920426148

@ -3,6 +3,7 @@ local util = require("ffi/util")
local DEBUG = require("dbg")
local function yes() return true end
local function no() return false end
local Device = Generic:new{
model = "Emulator",
@ -12,6 +13,7 @@ local Device = Generic:new{
hasDPad = yes,
hasFrontlight = yes,
isTouchDevice = yes,
needsScreenRefreshAfterResume = no,
}
function Device:init()

@ -2,6 +2,7 @@ local Event = require("ui/event")
local util = require("ffi/util")
local DEBUG = require("dbg")
local function yes() return true end
local function no() return false end
local Device = {
@ -34,6 +35,8 @@ local Device = {
viewport = nil,
-- enforce portrait orientation on display, no matter how configured at startup
isAlwaysPortrait = no,
-- needs full screen refresh when resumed from screensaver?
needsScreenRefreshAfterResume = yes,
}
function Device:new(o)
@ -132,7 +135,9 @@ end
function Device:resume()
local UIManager = require("ui/uimanager")
UIManager:unschedule(self.suspend)
self.screen:refreshFull()
if self:needsScreenRefreshAfterResume() then
self.screen:refreshFull()
end
self.screen_saver_mode = false
self.powerd:refreshCapacity()
end

@ -2,6 +2,7 @@ local Generic = require("device/generic/device")
local DEBUG = require("dbg")
local function yes() return true end
local function no() return false end
local Kindle = Generic:new{
model = "Kindle",
@ -71,6 +72,7 @@ local KindleVoyage = Kindle:new{
hasKeys = yes,
display_dpi = 300,
touch_dev = "/dev/input/event1",
needsScreenRefreshAfterResume = no,
}
local KindlePaperWhite3 = Kindle:new{

Loading…
Cancel
Save