WIP, untested, can probably simplified some more.
Good news is, it should be smarter, and thus provide a smoother user
experience :).
Relies on the relevant changes in base.
-- We don't really have an easy way to know if we're refreshing the UI, or a page, or if said page contains an image, so go with the highest fidelity option
-- We spend much more time in the reader than the UI, and our UI isn't very graphic anyway, so we'll follow the reader's behaviour above all
-- NOTE: Or we could go back to what KOReader did before fa55acc in koreader-base, which was also to use AUTO ;). I have *no* idea how the driver makes its choice though...
-- Here, we're actually interested in handling regional updates (which happen to be PARTIAL by definition), and not 'PARTIAL' updates that actually refresh the whole screen.
waveform_mode=self.default_waveform_mode
end
-- If the update is FULL or REAGL, wait for the previous update marker!
-- FIXME: Given the previous tests, could be folded into only check for UPDATE_FULL, in which case it can move to framebuffer_linux, and the whole wait_for_* can go away?
-- Except the fact that we probably need to wait for submission for partials on Kindle...
-- REAGL refreshes are always FULL (but without a black flash), but we want to keep our black flash timeout working, so don't reset the counter on FULL REAGL refreshes...