Fix deadlock
mSurface.destroy() may block on a HardwareRenderer if lockHardwareCanvas is used. mSurfaceControlLock is also used on the RenderThread, so it cannot hold that lock when potentially calling into HardwareRenderer as this is a deadlock risk. Fixes: 244616968 Test: guess Change-Id: Iedb6f3ce80f47a67b4427550f27851c3b9e3e242
This commit is contained in:
@@ -728,8 +728,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
|
||||
|
||||
private void releaseSurfaces(boolean releaseSurfacePackage) {
|
||||
mAlpha = 1f;
|
||||
mSurface.destroy();
|
||||
synchronized (mSurfaceControlLock) {
|
||||
mSurface.destroy();
|
||||
if (mBlastBufferQueue != null) {
|
||||
mBlastBufferQueue.destroy();
|
||||
mBlastBufferQueue = null;
|
||||
|
||||
Reference in New Issue
Block a user