diff options
author | 2025-03-17 12:17:14 +0000 | |
---|---|---|
committer | 2025-03-18 08:46:25 +0000 | |
commit | 140c3a50883e49771200249fbf971883533e80d1 (patch) | |
tree | 213ff01869d41ec5106a9ddca530a6a881b399b0 /libs/androidfw/AssetManager2.cpp | |
parent | 440faf35257727adaa6c90e3d2de1221f28d4d21 (diff) |
Defer close snapshot's hardware buffer after remove snapshot from cache
The hardware buffer can be closed when either:
1. No transition is collecting/running, or
2. After a transition finish.
This provides a simple protection because we have ensure the snapshot
object is removed from cache, so either it's not used anymore, or it's
used for a collecting transition. The queued transition won't able
to get the snapshot because it was removed from cache.
Flag: com.android.window.flags.safe_release_snapshot_aggressively
Bug: 238206323
Bug: 402277988
Test: atest TaskSnapshotCacheTest TaskSnapshotLowResDisabledTest
TaskSnapshotPersisterLoaderTest ActivitySnapshotControllerTests
Change-Id: I549d9abdb2ca0d18a22cbc74cbf13fcdf3f4bb0a
Diffstat (limited to 'libs/androidfw/AssetManager2.cpp')
0 files changed, 0 insertions, 0 deletions