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

Commit 0ab4a098 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Don't prematurely finish sync if an explicit sync is in flight" into main

parents 263ea3bc a7ad1844
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5700,7 +5700,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            // window becomes visible while the sync group is still active.
            return true;
        }
        if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mLastConfigReportedToClient && isDrawn()) {
        if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mLastConfigReportedToClient && isDrawn()
                && mPrepareSyncSeqId <= 0) {
            // Complete the sync state immediately for a drawn window that doesn't need to redraw.
            onSyncFinishedDrawing();
        }
+2 −1
Original line number Diff line number Diff line
@@ -1376,8 +1376,9 @@ public class WindowOrganizerTests extends WindowTestsBase {
        assertTrue(w1.syncNextBuffer());
        assertTrue(w2.syncNextBuffer());

        // A drawn window can complete the sync state automatically.
        // A drawn window in non-explicit sync can complete the sync state automatically.
        w1.mWinAnimator.mDrawState = WindowStateAnimator.HAS_DRAWN;
        w1.mPrepareSyncSeqId = 0;
        makeLastConfigReportedToClient(w1, true /* visible */);
        mWm.mSyncEngine.onSurfacePlacement();
        verify(mockCallback).onTransactionReady(anyInt(), any());