diff options
| author | 2024-01-05 18:40:23 +0800 | |
|---|---|---|
| committer | 2024-01-08 15:21:54 +0800 | |
| commit | d83211636a5b3a0289c0d7badc407f576e3a1112 (patch) | |
| tree | b2978304b287e8f2156f1e8d8b36ed1d006ad8b3 /libs/hwui/FrameInfoVisualizer.cpp | |
| parent | 429020ddbab67cde0e7b8a508f1be28ca9caf3f7 (diff) | |
Avoid applying unexpected sync state when checking sync finish
For example:
A task launch transition is completed so its window finishes sync
to SYNC_STATE_NONE. And then a new activity X is launching in the
same task (given sync-group{X}). If a code path accidentally invokes
isSyncFinished to check a window that isn't in the sync-group, e.g.
the window of previous activity, then prepareSync will still be called
and change the sync state to SYNC_STATE_WAITING_FOR_DRAW.
And later when removing the window without sync-group, an exception
will be thrown by not SYNC_STATE_NONE.
So when checking isSyncFinished, if there is no sync-group from
ancestor, then behave as a getter function.
Also tweak getSyncGroup a bit to reduce method invocation.
Fix: 318642514
Test: atest SyncEngineTests#testWaitingSyncCallback
Change-Id: Idd1bc09eb9bdec1a8b0ba44fa34f417f2fa92102
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions