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

Commit 4b89e85c authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Avoid extra force-relayout for sync

The related steps of launching app with shell transition:
1. Set sync state
2. Start/resume the app
3. Add app or starting window and calls relayoutWindow
4. relayoutWindow
     - performSurfacePlacement
       - updateResizingWindowIfNeeded
     - Return sync id because sync state was set
5. The client finishes drawing with sync draw transaction

If updateResizingWindowIfNeeded still includes the window to redraw,
there will be extra non-sync relayoutWindow/finishDrawing, because
the sync seq id doesn't increase. That is unnecessary cost.

Bug: 231435331
Test: Enable shell transition.
      While cold/warm/hot launch app or swipe to recents,
      the 2nd doFrame of app window should not call relayoutWindow.
Change-Id: I6faad4b9adac7334df7caf3d23df59bd3e96bfd9
parent 619760a5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -6043,6 +6043,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (mRedrawForSyncReported) {
            return false;
        }
        if (mInRelayout) {
            // The last sync seq id will return to the client, so there is no need to request the
            // client to redraw.
            return false;
        }
        return useBLASTSync();
    }