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

Commit e093dca3 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Only allow one relayout with sync per sync request"

parents 893a5a76 10054666
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2500,9 +2500,11 @@ public class WindowManagerService extends IWindowManager.Stub
            }
            win.mInRelayout = false;

            if (mUseBLASTSync && win.useBLASTSync() && viewVisibility != View.GONE) {
            if (mUseBLASTSync && win.useBLASTSync() && viewVisibility != View.GONE
                    && win.mNextRelayoutUseSync) {
                win.prepareDrawHandlers();
                win.markRedrawForSyncReported();
                win.mNextRelayoutUseSync = false;
                result |= RELAYOUT_RES_BLAST_SYNC;
            }

+3 −0
Original line number Diff line number Diff line
@@ -363,6 +363,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
    private boolean mDragResizingChangeReported = true;
    private int mResizeMode;
    private boolean mRedrawForSyncReported;
    boolean mNextRelayoutUseSync;

    /**
     * {@code true} when the client was still drawing for sync when the sync-set was finished or
@@ -5659,6 +5660,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        // 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;
        mNextRelayoutUseSync = true;
        requestRedrawForSync();
        return true;
    }
@@ -5840,6 +5842,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     */
    void applyWithNextDraw(Consumer<SurfaceControl.Transaction> consumer) {
        mPendingDrawHandlers.add(consumer);
        mNextRelayoutUseSync = true;
        requestRedrawForSync();

        mWmService.mH.sendNewMessageDelayed(WINDOW_STATE_BLAST_SYNC_TIMEOUT, this,