Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09efebff authored by wilsonshih's avatar wilsonshih
Browse files

Drawing app theme snapshot without hold wm lock.

A potential deadlock could happen when hold wm lock and require
hardware buffer from createHardwareBitmap, the rendering thread can be
blocked because it is waiting for dequeue buffer.
Defer the create snapshot process in a supplier, to escape the wm lock
if the snapshot should be draw by render thread.
Also add a parameter allowAppTheme in captureSnapshot, then the caller
can decide to not capture fake snapshot.

Flag: com.android.window.flags.exclude_drawing_app_theme_snapshot_from_lock
Bug: 373502791
Test: atest ActivitySnapshotControllerTests TransitionTests
TaskSnapshotControllerTest
Test: verify there won't block render thread while capture app snapshot
for app theme mode.

Change-Id: I7add8baecb0d068bac485fe9eee0c90f23d2f823
parent 3be7f872
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment