Do position-update on current sync if sync active

If blast-sync is active, then the syncTransaction is already
"waiting" until the frame is drawn or we have just received
the new frame. Since this is the case, just put the position
on that same transaction instead of queueing up a redundant
redraw.

Bug: 228885074
Test: with shell-transitions, enter split with an auto-pip,
      then swipe-to-home.
Change-Id: Ib5629718a1cf50746e519dcdf7a633e6f5066527
This commit is contained in:
Evan Rosky
2022-04-11 18:33:37 -07:00
parent 74ef154b1b
commit 8149f57bec

View File

@@ -5586,7 +5586,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mLastSurfaceInsets.set(mAttrs.surfaceInsets);
}
if (surfaceSizeChanged && mWinAnimator.getShown() && !canPlayMoveAnimation()
&& okToDisplay()) {
&& okToDisplay() && !useBLASTSync()) {
applyWithNextDraw(mSetSurfacePositionConsumer);
} else {
mSetSurfacePositionConsumer.accept(t);