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

Commit 26af7866 authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Treat GONE windows as READY for sync" into sc-v2-dev am: b5da127d

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

Change-Id: I6f636ae2be4b40d618276d16ed0e8ae153f3d921
parents 716f6fd0 b5da127d
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -5974,7 +5974,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        // since a generic WindowContainer only needs to wait for its
        // children to finish and is immediately ready from its own
        // perspective but at the WindowState level we need to wait for ourselves
        // to draw even if the children draw first our don't need to sync, so we start
        // to draw even if the children draw first or don't need to sync, so we start
        // in WAITING state rather than READY.
        mSyncState = SYNC_STATE_WAITING_FOR_DRAW;
        requestRedrawForSync();
@@ -5985,6 +5985,16 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return true;
    }

    @Override
    boolean isSyncFinished() {
        if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mViewVisibility == View.GONE) {
            // Don't wait for GONE windows. However, we don't alter the state in case the window
            // becomes un-gone while the syncset is still active.
            return true;
        }
        return super.isSyncFinished();
    }

    boolean finishDrawing(SurfaceControl.Transaction postDrawTransaction) {
        if (mOrientationChangeRedrawRequestTime > 0) {
            final long duration =