SurfaceView: Lock mDeferredDestroySurfaceControl
Since mDeferredDestroySurfaceControl is the same underlying object as mSurfaceControl we also need to hold the mSurfaceControlLock when writing to it. Bug: 157657896 Test: Existing tests pass Change-Id: Ie0da3ed5d94c7aae2593423fa2767dbc902da4c8
This commit is contained in:
@@ -1200,8 +1200,10 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
|
||||
}
|
||||
|
||||
if (mDeferredDestroySurfaceControl != null) {
|
||||
mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply();
|
||||
mDeferredDestroySurfaceControl = null;
|
||||
synchronized (mSurfaceControlLock) {
|
||||
mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply();
|
||||
mDeferredDestroySurfaceControl = null;
|
||||
}
|
||||
}
|
||||
|
||||
runOnUiThread(this::performDrawFinished);
|
||||
|
||||
Reference in New Issue
Block a user