* Enable HW dithering on supported devices (Clara HD, Forma; Oasis 2, PW4)
* FileManager and co. (where appropriate, i.e., when covers are shown)
* Book Status
* Reader, where appropriate:
* CRe: on pages whith image content (for over 7.5% of the screen area, should hopefully leave stuff like bullet points or small scene breaks alone).
* Other engines: on user-request (in the gear tab of the bottom menu), via the new "Dithering" knob (will only appear on supported devices).
* ScreenSaver
* ImageViewer
* Minimize repaints when flash_ui is enabled (by, almost everywhere, only repainting the flashing element, and not the toplevel window which hosts it).
(The first pass of this involved fixing a few Button instances whose show_parent was wrong, in particular, chevrons in the FM & TopMenu).
* Hunted down a few redundant repaints (unneeded setDirty("all") calls),
either by switching the widget to nil when only a refresh was needed, and not a repaint,
or by passing the appropritate widget to setDirty.
(Note to self: Enable *verbose* debugging to catch broken setDirty calls via its post guard).
There were also a few instances of 'em right behind a widget close.
* Don't repaint the underlying widget when initially showing TopMenu & ConfigDialog.
We unfortunately do need to do it when switching tabs, because of their variable heights.
* On Kobo, disabled the extra and completely useless full refresh before suspend/reboot/poweroff, as well as on resume. No more double refreshes!
* Fix another debug guard in Kobo sysfs_light
* Switch ImageWidget & ImageViewer mostly to "ui" updates, which will be better suited to image content pretty much everywhere, REAGL or not.
PS: (Almost 💯 commits! :D)
-- special case: set all top-level widgets as being "dirty".
fori=1,#self._window_stackdo
self._dirty[self._window_stack[i].widget]=true
-- If any of 'em were dithered, honor their dithering hint
ifself._window_stack[i].widget.ditheredthen
-- NOTE: That works when refreshtype is NOT a function,
-- which is why _repaint does another pass of this check ;).
refreshdither=true
end
end
elseifnotwidget.invisiblethen
-- We only ever check the dirty flag on top-level widgets, so only set it there!
-- NOTE: Enable verbose debug to catch misbehaving widgets via our post-guard.
fori=1,#self._window_stackdo
ifself._window_stack[i].widget==widgetthen
self._dirty[widget]=true
end
end
-- Again, if it's flagged as dithered, honor that
ifwidget.ditheredthen
refreshdither=true
end
end
end
-- handle refresh information
iftype(refreshtype)=="function"then
-- callback, will be issued after painting
@ -493,23 +527,23 @@ function UIManager:setDirty(widget, refreshtype, refreshregion)
ifdbg.is_onthen
-- FIXME: We can't consume the return values of refreshtype by running it, because for a reason that is beyond me (scoping? gc?), that renders it useless later, meaning we then enqueue refreshes with bogus arguments...
-- Thankfully, we can track them in _refresh()'s logging very soon after that...
logger.dbg("setDirty via a func from widget",widgetand(widget.nameorwidget.idortostring(widget)))
logger.dbg("setDirty via a func from widget",widgetand(widget.nameorwidget.idortostring(widget))or"nil")