summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mateusz Cicheński <mateuszc@google.com> 2023-05-16 00:27:36 +0000
committer Mateusz Cicheński <mateuszc@google.com> 2023-05-16 06:34:47 +0000
commitd137a1dba045925ed6a20f1fad80fbbdb79c04e7 (patch)
tree6e8a7edc6a001a82cec24712d2c89f71f0c289eb
parentfd8948a9285f358a2364a84baa10d8ee01c0977a (diff)
Set alpha to 0 on attach to avoid flicker at transition start.
Otherwise there is a race condition risk of rendering it for one frame before it actually gets the first call to onAnimationUpdate. Change-Id: Ifcf7103a78631c6c1408735acf3eb13888ae8dea Test: manual, 20x enter Maps PiP without the repro of overlay flicker Bug: 281711939
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java
index 9fa57cacb11f..c701b9581ca2 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java
@@ -206,6 +206,7 @@ public abstract class PipContentOverlay {
tx.show(mLeash);
tx.setLayer(mLeash, Integer.MAX_VALUE);
tx.setBuffer(mLeash, mBitmap.getHardwareBuffer());
+ tx.setAlpha(mLeash, 0f);
tx.reparent(mLeash, parentLeash);
tx.apply();
}