Chore: Make sure we always pass a rect to `fb:refreshFull` (#11307)

* UIManager: Init a full Geom on region-less refreshes in _refresh
* Never call refreshFull with no arguments
  I got rid of the low-level nil guards, because UIManager itself guarantees that it can never happen
* Bump base (https://github.com/koreader/koreader-base/pull/1718) (fix #11303)
* Kindle: Re-enable HW dithering on the Scribe
  Now that the underlying issue is fixed in base ;).
reviewable/pr11341/r3
NiLuJe 4 months ago committed by GitHub
parent 18c17829b7
commit c97d20cd24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit d83148b27e25b9332678221f6737d66be7e73318
Subproject commit 5f9b9b6f89d6865ba0247adc09aecaa593c9e03f

@ -326,7 +326,7 @@ function Device:onPowerEvent(ev)
self:resume()
local widget_was_closed = Screensaver:close()
if widget_was_closed and self:needsScreenRefreshAfterResume() then
UIManager:scheduleIn(1, function() self.screen:refreshFull() end)
UIManager:scheduleIn(1, function() self.screen:refreshFull(0, 0, self.screen:getWidth(), self.screen:getHeight()) end)
end
self.powerd:afterResume()
end
@ -371,7 +371,7 @@ function Device:onPowerEvent(ev)
-- and on platforms where we defer to a system tool, it'd probably suspend too early!
-- c.f., #6676
if self:needsScreenRefreshAfterResume() then
self.screen:refreshFull()
self.screen:refreshFull(0, 0, self.screen:getWidth(), self.screen:getHeight())
end
-- NOTE: In the same vein as above, make sure we update the screen *now*, before dealing with Wi-Fi.
UIManager:forceRePaint()

@ -639,7 +639,7 @@ local KindleScribe = Kindle:extend{
hasGSensor = yes,
display_dpi = 300,
touch_dev = "/dev/input/touch",
canHWDither = no,
canHWDither = yes,
canDoSwipeAnimation = yes,
}

@ -529,7 +529,7 @@ function Screensaver:show()
if self:withBackground() then
Screen:clear()
end
Screen:refreshFull()
Screen:refreshFull(0, 0, Screen:getWidth(), Screen:getHeight())
-- On Kobo, on sunxi SoCs with a recent kernel, wait a tiny bit more to avoid weird refresh glitches...
if Device:isKobo() and Device:isSunxi() then

@ -1170,7 +1170,7 @@ function UIManager:_refresh(mode, region, dither)
end
-- if no region is specified, use the screen's dimensions
region = region or Geom:new{w=Screen:getWidth(), h=Screen:getHeight()}
region = region or Geom:new{x = 0, y = 0, w = Screen:getWidth(), h = Screen:getHeight()}
-- if no dithering hint was specified, don't request dithering
dither = dither or false

Loading…
Cancel
Save