Faster blitting @ BB8/BBRGB32 when no processing is needed (#4847)

* Pickup the eponymous blitting performance tweaks from koreader/koreader-base#878
* Cleanup BitOpts usage (require & cache)
* Unify oddness checks (MOD -> AND)
* Enforce the native Portrait orientation on Kobo (except @ 16bpp, i.e., KSM w/ 8bpp swap disabled), to allow for faster blitting when unrotted.
* Switch CRe BB to 32BPP on color screens
* Minor cleanups
This commit is contained in:
NiLuJe
2019-03-27 22:50:44 +01:00
committed by GitHub
parent fe3fc78171
commit 7210fb478d
12 changed files with 64 additions and 51 deletions

View File

@@ -134,6 +134,7 @@ function Document:fastDigest(docsettings)
local result = docsettings:readSetting("partial_md5_checksum")
if not result then
logger.dbg("computing and storing partial_md5_checksum")
local bit = require("bit")
local md5 = require("ffi/MD5")
local lshift = bit.lshift
local step, size = 1024, 1024