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

Skip to content
Commit 79e9167e authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Cache decor insets for display switch

In general this can reduce the amount of display configuration change
from 2~4 times to 1 when switching physical display, e.g. fold/unfold.

The multiple configuration changes are from the insets provider
windows that change their provided insets size which can affect
display configuration. Or even the windows can be added or removed
that also triggers the change.

The concept:
 1. The first time fold->unfold:
    Cache folded insets.
    Still perform multiple config changes to calculate unfold.
 2. Unfold->fold:
    The decor insets in folded state is known, use it directly.
    Cache unfolded insets.
 3. Fold->unfold:
    Cached unfolded insets is available, similar as 2.

Bug: 266197298
Test: DisplayPolicyTests#testSwitchDecorInsets

Change-Id: Icb832bad8c6a7412b6fc0ecba318d2034681d3f7
parent 1c5290f2
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