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

Commit d8835256 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Only complete sync draw for visible window" into tm-qpr-dev

parents 1a27751c 90233372
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -650,7 +650,7 @@ public class WindowManagerService extends IWindowManager.Stub
    // Whether the system should use BLAST for ViewRootImpl
    final boolean mUseBLAST;
    // Whether to enable BLASTSyncEngine Transaction passing.
    final boolean mUseBLASTSync = true;
    static final boolean USE_BLAST_SYNC = true;

    final BLASTSyncEngine mSyncEngine;

@@ -2576,7 +2576,7 @@ public class WindowManagerService extends IWindowManager.Stub

            if (outSyncIdBundle != null) {
                final int maybeSyncSeqId;
                if (mUseBLASTSync && win.useBLASTSync() && viewVisibility != View.GONE
                if (USE_BLAST_SYNC && win.useBLASTSync() && viewVisibility == View.VISIBLE
                        && win.mSyncSeqId > lastSyncSeqId) {
                    maybeSyncSeqId = win.shouldSyncWithBuffers() ? win.mSyncSeqId : -1;
                    win.markRedrawForSyncReported();
@@ -5659,7 +5659,7 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    public boolean useBLASTSync() {
        return mUseBLASTSync;
        return USE_BLAST_SYNC;
    }

    @Override
+3 −3
Original line number Diff line number Diff line
@@ -5959,10 +5959,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP

    @Override
    boolean isSyncFinished() {
        if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mViewVisibility == View.GONE
        if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mViewVisibility != View.VISIBLE
                && !isVisibleRequested()) {
            // 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.
            // Don't wait for invisible windows. However, we don't alter the state in case the
            // window becomes visible while the sync group is still active.
            return true;
        }
        return super.isSyncFinished();