Destroy DisplayDevice without holding the state lock
This is a temporary solution until we can manage transaction queues without holding the mStateLock. With blast, the IGBP that is passed to the VirtualDisplaySurface is owned by the client. When the IGBP is disconnected, its buffer cache in SF will be cleared via SurfaceComposerClient::doUncacheBufferTransaction. This call from the client ends up running on the main thread causing a deadlock since setTransactionstate will try to acquire the mStateLock. Instead we extend the lifetime of DisplayDevice and destroy it in the main thread without holding the mStateLock. The display will be disconnected and removed from the mDisplays list so it will not be accessible. Bug: 168917217 Test: adb shell settings put global use_blast_adapter_sv 1 && atest android.server.wm.MultiDisplayActivityLaunchTests Change-Id: I8b94277cf2e807d47d6a61e4aafd8c2f183e6e7c
Loading
Please register or sign in to comment