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
Loading
Please register or sign in to comment