Skip to content
Commit 172bdbc5 authored by Robert Carr's avatar Robert Carr
Browse files

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
parent 196200de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment