Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57c853f2 authored by Robert Carr's avatar Robert Carr
Browse files

SurfaceView: Release BBQ where we release Surface

This more closesly mirrors the timing of pre-BLAST behavior. There
are also some concerns that we may not reach releaseSurfaces if our
first call to tryReleaseSurface came through ViewRoot#doDie.

Bug: 176691195
Test: Existing tests pass
Change-Id: I211a3e80eab1e847a4d6ade47ff19cf131de8f39
parent 19998289
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -877,6 +877,10 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall

        synchronized (mSurfaceControlLock) {
            mSurface.release();
            if (mBlastBufferQueue != null) {
                mBlastBufferQueue.destroy();
                mBlastBufferQueue = null;
            }

            if (mRtHandlingPositionUpdates) {
                mRtReleaseSurfaces = true;
@@ -901,10 +905,6 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
            transaction.remove(mBlastSurfaceControl);
            mBlastSurfaceControl = null;
        }
        if (mBlastBufferQueue != null) {
            mBlastBufferQueue.destroy();
            mBlastBufferQueue = null;
        }
    }

    private boolean performSurfaceTransaction(ViewRootImpl viewRoot, Translator translator,