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
This commit is contained in:
NiLuJe
2021-02-21 06:26:04 +01:00
committed by GitHub
parent 10f65a16e7
commit e582036c3e
2 changed files with 7 additions and 1 deletions

2
base

Submodule base updated: d052cd6e0e...529d74140f

View File

@@ -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
--