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
This commit is contained in:
Mateusz Cicheński
2023-05-16 00:27:36 +00:00
parent fd8948a928
commit d137a1dba0

View File

@@ -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();
}