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

Commit 6562a845 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "WM: Prepare BLASTSync to flip main BLAST flag."

parents 5e528338 2333ecb6
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -665,6 +665,8 @@ 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 = false;

    int mDockedStackCreateMode = SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT;
    Rect mDockedStackCreateBounds;
@@ -2129,7 +2131,7 @@ public class WindowManagerService extends IWindowManager.Stub
                win.finishSeamlessRotation(false /* timeout */);
            }

            if (win.useBLASTSync()) {
            if (mUseBLASTSync && win.useBLASTSync()) {
                result |= RELAYOUT_RES_BLAST_SYNC;
            }

@@ -5127,6 +5129,10 @@ public class WindowManagerService extends IWindowManager.Stub
        return mUseBLAST;
    }

    public boolean useBLASTSync() {
        return mUseBLASTSync;
    }

    @Override
    public void getInitialDisplaySize(int displayId, Point size) {
        synchronized (mGlobalLock) {
+9 −0
Original line number Diff line number Diff line
@@ -5814,6 +5814,15 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            return;
        }

        final Task task = getTask();
        if (task != null) {
            final SurfaceControl.Transaction t = task.getMainWindowSizeChangeTransaction();
            if (t != null) {
                mBLASTSyncTransaction.merge(t);
            }
            task.setMainWindowSizeChangeTransaction(null);
        }

        // If localSyncId is >0 then we are syncing with children and will
        // invoke transaction ready from our own #transactionReady callback
        // we just need to signal our side of the sync (setReady). But if we
+5 −0
Original line number Diff line number Diff line
@@ -636,6 +636,11 @@ class WindowStateAnimator {
    }

    private boolean shouldConsumeMainWindowSizeTransaction() {
      // If we use BLASTSync we always consume the transaction when finishing
      // the sync.
      if (mService.useBLASTSync()) {
          return false;
      }
      // We only consume the transaction when the client is calling relayout
      // because this is the only time we know the frameNumber will be valid
      // due to the client renderer being paused. Put otherwise, only when