summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Jorge Gil <jorgegil@google.com> 2024-08-20 22:53:04 +0000
committer Jorge Gil <jorgegil@google.com> 2024-09-16 17:06:17 +0000
commit8c2eacb4e803a290ea3cc8e4a93f289e74e6fffc (patch)
treeebad034f594672bd5bbd10603dcfa286fcd3a00d /libs/androidfw/StringPool.cpp
parent4c008874f9512e16d11095e799164ca943b0f58d (diff)
Add reusable WindowDecorViewHosts with a pool-backed supplier
Adds a ReusableWindowDecorViewHosts that allows swapping entire View hierarchies (such as when a task is changing from fullscreen<->freeform and thus the App Handle needs to change to an App Header or viceversa). It also allows pre-warming it to avoid creation latency during transition (where window decorations are usually created). To manage their reusability, the new PooledWindowDecorViewHostSupplier handles acquiring/releasing them into a SynchronizedPool, with an initial max capacity set to be equal to the max # of desktop windows allowed in the system. The preWarmSize of 2 was selected as it is the maximum number of simultaneous decorations that may be created at once after a fresh system start (launching a split-pair that requires two App Handles). Bug: 360452034 Flag: com.android.window.flags.enable_desktop_windowing_scvh_cache Test: atest WMShellUnitTests Test: in perfetto trace, launching the first two desktop tasks reduces transition latency by about 5ms for each task, and closing/re-opening windows remains low latency when acquiring pooled view hosts. Change-Id: I08111bfd4728e5223ed078916255313b13a4093f
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions