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

Commit 91ecb004 authored by Rob Carr's avatar Rob Carr Committed by Automerger Merge Worker
Browse files

Merge "SurfaceView: Clean up deferred-destroy-surface from UI thread" into...

Merge "SurfaceView: Clean up deferred-destroy-surface from UI thread" into rvc-dev am: 9464091e am: 7f46d57c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12010092

Change-Id: I43f2bd15f8c215dcd6f21541179d3c85140fe3ed
parents 9fb76d9b 7f46d57c
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -471,6 +471,13 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
    }
    }


    private void performDrawFinished() {
    private void performDrawFinished() {
        if (mDeferredDestroySurfaceControl != null) {
            synchronized (mSurfaceControlLock) {
                mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply();
                mDeferredDestroySurfaceControl = null;
            }
        }

        if (mPendingReportDraws > 0) {
        if (mPendingReportDraws > 0) {
            mDrawFinished = true;
            mDrawFinished = true;
            if (mAttachedToWindow) {
            if (mAttachedToWindow) {
@@ -1194,13 +1201,6 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                    + "finishedDrawing");
                    + "finishedDrawing");
        }
        }


        if (mDeferredDestroySurfaceControl != null) {
            synchronized (mSurfaceControlLock) {
                mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply();
                mDeferredDestroySurfaceControl = null;
            }
        }

        runOnUiThread(this::performDrawFinished);
        runOnUiThread(this::performDrawFinished);
    }
    }