summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-12-28 18:40:34 +0800
committer Riddle Hsu <riddlehsu@google.com> 2023-12-29 14:23:41 +0000
commit1d006f483e1f4f36720424b948d819a76f065956 (patch)
tree348928d23419d24b683998afe8f48cae7782e03f /libs/androidfw/FileStream.cpp
parentb017819a05be0c7ffb85f3d62f87e8c1256a0051 (diff)
Optimize magnifier viewport drawing
1. Reduce the number of drawIfNeeded calls in fullscreen mode by 99%. Because updateMagnificationSpec -> setMagnifiedRegionBorderShown will be called with motion events when changing zoom. Then even if the border region is not changed, it still always forces redraw. So simply skip if the border shown state is not changed. 2. Only apply surface transaction if related attributes are changed. 3. drawIfNeeded was always called inside WM lock, so the change [1] didn't work. With this change, drawIfNeeded is still called on the same animation thread but it is executed from message directly, then the change [1] can take effect that avoids holding WM lock when calling lockCanvas. [1]: Id828744c8c5bcb4bdb3be9a11810338614b84b2e Bug: 276845499 Fix: 316075123 Test: atest AccessibilityMagnificationTest Change-Id: Ibbb9f86112bf734cd0d2cd27f39aabcd13e003cc
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions