summaryrefslogtreecommitdiff
path: root/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2021-08-24 13:36:41 -0700
committerLucas Dupin <dupin@google.com>2021-08-24 14:17:59 -0700
commit0c70dbdc5e53fd55bf79edecc825c9c496fae8cc (patch)
tree409ad36efff52c52557ea4bda5a427d782bf3c72 /quickstep/src/com/android/launcher3/statehandlers/DepthController.java
parentc8295216d5904634ee3858668e9e763334e2bab0 (diff)
Synchronize surface transaction
Until now the SurfaceControl transaction was being applied asynchronously, which could lead to it being executed out of sync with launcher drawing. This became an issue at higher refresh rates, where frames are produced at a much faster pace. In order to fix this issue, we can use BLAST transactions, which are annotated with a frame number. Test: record video, go through it manually Fixes: 194320152 Change-Id: I1636a1ded4f9dd84c54ba12239e3549b92ed7567
Diffstat (limited to 'quickstep/src/com/android/launcher3/statehandlers/DepthController.java')
-rw-r--r--quickstep/src/com/android/launcher3/statehandlers/DepthController.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
index 5777fb9a7f..68159fafdd 100644
--- a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
+++ b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
@@ -26,6 +26,7 @@ import android.animation.ObjectAnimator;
import android.os.IBinder;
import android.os.SystemProperties;
import android.util.FloatProperty;
+import android.view.AttachedSurfaceControl;
import android.view.CrossWindowBlurListeners;
import android.view.SurfaceControl;
import android.view.View;
@@ -316,7 +317,12 @@ public class DepthController implements StateHandler<LauncherState>,
transaction.setEarlyWakeupEnd();
mInEarlyWakeUp = false;
}
- transaction.apply();
+
+ AttachedSurfaceControl rootSurfaceControl =
+ mLauncher.getRootView().getRootSurfaceControl();
+ if (rootSurfaceControl != null) {
+ rootSurfaceControl.applyTransactionOnDraw(transaction);
+ }
}
return true;
}