Make animation leashes effect layers

Fixes: 151844058
Test: go/wm-smoke no black flickers
Change-Id: Ie2a35a607af61443b5133a623e6eaa7a80cda780
This commit is contained in:
Vishnu Nair
2020-03-18 12:09:43 -07:00
parent dca10f7c72
commit 4ae4c33881

View File

@@ -379,7 +379,8 @@ class SurfaceAnimator {
if (DEBUG_ANIM) Slog.i(TAG, "Reparenting to leash");
final SurfaceControl.Builder builder = animatable.makeAnimationLeash()
.setParent(animatable.getAnimationLeashParent())
.setName(surface + " - animation-leash");
.setName(surface + " - animation-leash")
.setColorLayer();
final SurfaceControl leash = builder.build();
if (!hidden) {
// TODO(b/151665759) Defer reparent calls
@@ -390,6 +391,7 @@ class SurfaceAnimator {
// seamless rotation.
transactionFactory.get().unsetColor(leash).show(leash).apply();
}
t.unsetColor(leash);
t.setWindowCrop(leash, width, height);
t.setPosition(leash, x, y);
t.show(leash);