diff options
| author | 2025-02-27 20:54:57 -0600 | |
|---|---|---|
| committer | 2025-03-04 12:21:37 +0800 | |
| commit | 3148276a1b2f220a685b74ebe9e53576a229a5e8 (patch) | |
| tree | b069ea68b5bca8dae69f4345998e4db52a8cf568 /libs/androidfw/StringPool.cpp | |
| parent | 40aa32b37c5db1e6f9e4f7277b7c39a02ede32a9 (diff) | |
Use cached insets for display switch
The insets of common bars in previous device state will be cached.
When display switch transition is running, the previous cached
insets can be dispatched to each window before the insets provider
update new insets for new device state. That reduces intermediate
insets change and extra redraw.
The preserved insets only takes effect during display switch
transition is running.
Also cache PrivacyIndicatorBounds because it is also a member of
InsetsState that will trigger changes.
For an activity which doesn't consume insets when unfolding,
the amount of reduced change events:
View#onLayout: from 3 to 1
View#dispatchApplyWindowInsets: from 4 to 2
Bug: 266197298
Flag: com.android.window.flags.use_cached_insets_for_display_switch
Test: atest DisplayPolicyTests#testSwitchDecorInsets
Test: Check the number of calls to View#onLayout and
View.OnApplyWindowInsetsListener during fold/unfold.
Change-Id: I3a5b458624cee9daaa38dadff1c52ae03ee8d5a8
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions