-- 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
-- NOTE: Or we could go back to what KOReader did before fa55acc in koreader-base, which was also use WAVEFORM_MODE_AUTO ;). I have *no* idea how the driver makes its choice though...
-- NOTE: For ref, on a Touch (debugPaint is my new best friend):
-- UI: gc16_fast
-- Reader: When flash: if to/from img: gc16, else gc16_fast; when non-flash: auto (seems to prefer gl16_fast); Waiting for marker only on flash
-- On a PW2:
-- Same as Touch, except reader uses reagl on non-flash, non-flash lasts longer (12 pgs); Always waits for marker
ifrefresh_type==1then
-- 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
waveform_mode=WAVEFORM_MODE_GC16
else
-- We spend much more time in the reader than the UI, and our UI isn't very graphic anyway, so go with the reader behavior
ifDevice:getModel()=="KindlePaperWhite2"then
waveform_mode=WAVEFORM_MODE_REAGL
else
waveform_mode=WAVEFORM_MODE_GL16_FAST
-- NOTE: Or we could go back to what KOReader did before fa55acc in koreader-base, which was also use WAVEFORM_MODE_AUTO ;). I have *no* idea how the driver makes its choice though...