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

Commit de63cc6e authored by Robert Carr's avatar Robert Carr
Browse files

Fix mistake in SurfaceView lifetime refactoring.

When moving the SurfaceControl lifetime to the render-thread
callback I also moved the Surface lifetime. There was no reason to
do this since the SurfaceView Surface isn't accessed from render-thread.
It introduces a small indeterminism in lifetime making a test fail, so we
revert it for cleanness.

Bug: 142011183
Test: Manual
Change-Id: I98a3daf21e7ed598d557046fc5b2e4cfebf1c845
parent 62296e3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -716,6 +716,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
        mSurfaceAlpha = 1f;

        synchronized (mSurfaceControlLock) {
            mSurface.release();

            if (mRtHandlingPositionUpdates) {
                mRtReleaseSurfaces = true;
                return;
@@ -729,7 +731,6 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                mTmpTransaction.remove(mBackgroundControl);
                mBackgroundControl = null;
            }
            mSurface.release();
            mTmpTransaction.apply();
        }
    }
@@ -1202,7 +1203,6 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                    mRtTransaction.remove(mBackgroundControl);
                    mSurfaceControl = null;
                    mBackgroundControl = null;
                    mSurface.release();
                }
                mRtHandlingPositionUpdates = false;
            }