Merge "SurfaceView: Lock mDeferredDestroySurfaceControl" into rvc-dev

This commit is contained in:
Rob Carr
2020-06-02 19:27:08 +00:00
committed by Android (Google) Code Review

View File

@@ -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);