Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1d006f48 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent b017819a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment