From 14b8ea996ceff0130b29bd1647aca0e8f27970f3 Mon Sep 17 00:00:00 2001 From: chaviw Date: Tue, 15 Sep 2020 12:17:28 -0700 Subject: [PATCH] Perform traversal after finish drawing for Blast Sync Normally, a perform traversal wouldn't get called if WSA.finishDrawingLocked doesn't return true. It only returns true if the previous drawState was DRAW_PENDING which may not be the case if it's not the first draw. With blast sync, we will get a finish draw but not necessary the first draw. That means we may never trigger the perform traversal. We always wait for a perform traversal before notifying blast sync that we're done in case there's more data to gather into the transaction. In this change, always trigger perform traversal if finishDrawing was called because of blast sync. Test: Hard to trigger, but existing sync works Change-Id: Id95c0c84418cecd0e73befafe524102f9e3faad2 --- services/core/java/com/android/server/wm/WindowState.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 1f7457c088c53..27603fe121ab7 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -5893,7 +5893,9 @@ class WindowState extends WindowContainer implements WindowManagerP } mNotifyBlastOnSurfacePlacement = true; - return mWinAnimator.finishDrawingLocked(null); + mWinAnimator.finishDrawingLocked(null); + // We always want to force a traversal after a finish draw for blast sync. + return true; } private void notifyBlastSyncTransaction() {