summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java8
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java9
-rw-r--r--services/core/java/com/android/server/wm/WindowStateAnimator.java5
3 files changed, 21 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index d9c574ccc64c..9f7ef007d947 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -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;
@@ -2131,7 +2133,7 @@ public class WindowManagerService extends IWindowManager.Stub
win.finishSeamlessRotation(false /* timeout */);
}
- if (win.useBLASTSync()) {
+ if (mUseBLASTSync && win.useBLASTSync()) {
result |= RELAYOUT_RES_BLAST_SYNC;
}
@@ -5131,6 +5133,10 @@ public class WindowManagerService extends IWindowManager.Stub
return mUseBLAST;
}
+ public boolean useBLASTSync() {
+ return mUseBLASTSync;
+ }
+
@Override
public void getInitialDisplaySize(int displayId, Point size) {
synchronized (mGlobalLock) {
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 1f7457c088c5..5ab15f00af22 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -5904,6 +5904,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
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 029c158814b3..66476d1ec7f0 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -752,6 +752,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