[5/N] WindowDecorViewHost: Add pooled supplier & reusable ViewHost
Spiritual revert^2 of I08111bfd4728e5223ed078916255313b13a4093f, but
broken down into smaller changes.
Adds a ReusableWindowDecorViewHost that is able to swap view hierarchies
(e.g. App Handle <-> App Header) without having to release and create a
new SCVH. This is done by putting the desired view hierarchy inside a
root View that never changes.
Also adds a Pooled supplier that uses reusable view hosts with a
capacity equal to the desktop task limit.
Bug: 360452034
Flag: com.android.window.flags.enable_desktop_windowing_scvh_cache_bug_fix
Test: check perfetto trace for reused SCVHs
Change-Id: I30555d86ec6995decbca8a47c1008f1b79020899
6 files changed