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

Skip to content
Commit 86b8389a authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Skip surface placement if the given insets will not change

This reduces the amount of surface placement:
 2~3 times when notification shade expands or collapses.
 7 times when display rotates.
 6~9 times when fold state changes.

Currently even if the client knows the insets are not changed, it still
need to tell server side to clear a pending state:
1. Client performs relayout with RELAYOUT_INSETS_PENDING if there has a
   insets listener. That sets WindowState#mGivenInsetsPending to true.
2. The listener assigns the insets according to the result of relayout.
3. Client calls WindowSession#setInsets to send the insets and consume
   the pending state mGivenInsetsPending (set to false).

Besides, by combing the conditions of mGivenInsetsPending to client
side, it can reduce IPC calls such as 3 times setInsets from nav bar.

Bug: 294796470
Test: atest WindowInsetsControllerTests

Change-Id: Ice3320a4b694c771332107e4d8c77927e0260c8b
parent 17f39ef0
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