summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueThreadState.cpp
diff options
context:
space:
mode:
author Qi Jing <qi.jing@mediatek.com> 2023-08-25 23:01:47 +0000
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2023-08-25 23:01:47 +0000
commitb8e4c135a9ff6e1d413b6ad352650c5af7ca4c3d (patch)
tree9b8d1ce636b0c01856a34d5b9e5f19dde1ac9b50 /libs/gui/BufferQueueThreadState.cpp
parentd88ba9147bdab444d4d104f4ad5bde5ef0243e78 (diff)
Update LayerVector if the mirrorRoot is already inside
Mirror display creation and commitment are executed in different threads. The mMirrorDisplays may not have been updated when commitMirrorDisplays, so do the commitCreatedLayers first. If handleLayerCreatedLocked adding mirrorRoot to LayerVector of mCurrentState is executed before commitMirrorDisplays updating the LayerStack of the mirrorRoot as -1, The order of LayerVector will be disordered. Finally, the mirrorRoot cannot be found when removing. In order to fix this problem. Before commitMirrorDisplays sets the LayerStack of mirrorRoot, it needs to confirm whether the mirrorRoot is in LayerVector. If it is in LayerVector, re-add the layer to ensure that it is on the tail. Bug: 294942764 Test: Monkey test with 10 screen recording (cherry picked from https://partner-android-review.googlesource.com/q/commit:dd3d3ef5a393ee331c14de707321b3e7e3f60446) Merged-In: Iebcab7249ddbab31e8549c6d51a9b09c4c3549f4 Change-Id: Iebcab7249ddbab31e8549c6d51a9b09c4c3549f4
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
0 files changed, 0 insertions, 0 deletions