SurfaceView: Release Surfaces where SurfaceControl are released.
Following the same logic as the revision "Destroy SurfaceControl from RenderThread" we have a similar race condition with the native object behind the mSurface object. In addition that CL introduces a logic error...previously in positionLost we assumed if mSurfaceControl != null then mSurface had not been released, but now we release the Surface but wait on the RenderThread to release the SurfaceControl when it tries to grab the frame number to create the deferred transaction the Surface has already been released and we go on to crash. Releasing them all in the same place fixes this. Bug: 141525040 Test: go/wm-smoke Change-Id: I7c938cd498a9260146f34f2d6e18744854d69946
Loading
Please register or sign in to comment