From 8dd0cafe34615c4d6d66971377dc8a8a0ddba27c Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Wed, 4 May 2022 17:05:01 +0800 Subject: [PATCH] Still request sync draw if the window is not in sync group Because useBLASTSync may either use sync group or mDrawHandlers, but only sync group will use sync transaction. Otherwise the "t" may be the pending transaction. Bug: 229908970 Test: Enable shell transition. Launch landscape app from portrait app. The screen decors should not flicker. Change-Id: Iafdd67e2d159b70508820defe6b36356b9812081 --- services/core/java/com/android/server/wm/WindowState.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 91c6532ec3938..24efea53c30ad 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -5572,7 +5572,7 @@ class WindowState extends WindowContainer implements WindowManagerP mLastSurfaceInsets.set(mAttrs.surfaceInsets); } if (surfaceSizeChanged && mWinAnimator.getShown() && !canPlayMoveAnimation() - && okToDisplay() && !useBLASTSync()) { + && okToDisplay() && mSyncState == SYNC_STATE_NONE) { applyWithNextDraw(mSetSurfacePositionConsumer); } else { mSetSurfacePositionConsumer.accept(t); @@ -6009,7 +6009,6 @@ class WindowState extends WindowContainer implements WindowManagerP // We could be more subtle with Integer.MAX_VALUE and track a seqId in the timeout. finishDrawing(null, Integer.MAX_VALUE); mWmService.mH.removeMessages(WINDOW_STATE_BLAST_SYNC_TIMEOUT, this); - if (!useBLASTSync()) return; } @Override