TouchMenu: Workaround an EPDC race in the hold handler w/ flash_ui (#7325)

* Also bump base, because it's mildly related

https://github.com/koreader/koreader-base/pull/1312
pull/7328/head
NiLuJe 3 years ago committed by GitHub
parent 10f65a16e7
commit e582036c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit d052cd6e0eb129772d02ca85e7961a4ffe6aed28
Subproject commit 529d74140f5ad4d603e6a5939664a29acbfd770f

@ -215,6 +215,12 @@ function TouchMenuItem:onHoldSelect(arg, ges)
UIManager:setDirty(nil, "fast", highlight_dimen)
UIManager:forceRePaint()
-- NOTE: These very specific circumstances appear to reliably upset the EPDC,
-- causing a mild variant of our racey friend the papercut refresh glitch ;).
-- As it appears to stem from the race between *this* refresh for the highlight and the following writes to the fb,
-- let the kernel take a breather. It'll yield back to us when it's done.
-- Expect it to block for ~150 to 350ms. Given the context (a hold gesture), we can absorb the latency hit mostly unnnoticed.
UIManager:waitForVSync()
-- Unhighlight
--

Loading…
Cancel
Save