summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2024-01-03 06:47:33 +0000
committer Riddle Hsu <riddlehsu@google.com> 2024-01-04 15:12:04 +0800
commitec9d305106fdf4ce007baf9b2a1bd0488ebafeea (patch)
tree58bcc8f423fa737efbe16619abe49e2469430d18 /libs/androidfw/StringPool.cpp
parent429020ddbab67cde0e7b8a508f1be28ca9caf3f7 (diff)
Reland "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. AccessibilityMagnificationTest was highly flaky by "mSurface.release()" in releaseSurface is called on other thread. This reland fixes it by also posting the cleanup to the same thread. [1]: Id828744c8c5bcb4bdb3be9a11810338614b84b2e Bug: 276845499 Bug: 316075123 Bug: 318327737 Test: atest WindowManagerServiceTests#testDrawMagnifiedViewport Test: atest AccessibilityMagnificationTest --rerun-until-failure 10 Change-Id: I7b6559e10db3dcea0352f17b81e5537b711a18c5
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions