From 698b684fdd467c3e8d251cef9d4f9da0daa8195b Mon Sep 17 00:00:00 2001 From: Rob Carr Date: Fri, 6 Mar 2020 15:33:31 -0800 Subject: WindowManager: Avoid reparenting BLAST Surface in reparentChildren In cases where we are replacing the client surface transparently (e.g. preserved surfaces), we call reparentChildren to move client added Surfaces of the preserved Surface to the new Layer. However we are calling this on the WSA layer, and so we end up reparenting the BLAST Surface to the new layer. But since we always construct a new BLAST surface on the WM side, we end up with 2! Rather than try and juggle about when we need to or need not to construct a BLAST surface and reparenting them across preservedSurfaces, it seemed either to just use the BLAST surface as the root of the reparentChildren operation. Bug: 150013915 Test: Enable BLAST, use split-screen Change-Id: I1357200b41d183c2331b684ff636dd40a3b98168 --- core/java/android/view/ViewRootImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/java/android/view/ViewRootImpl.java') diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 8d3cffc512c3..9228fbdf82c8 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1735,7 +1735,7 @@ public final class ViewRootImpl implements ViewParent, mBoundsLayer = new SurfaceControl.Builder(mSurfaceSession) .setContainerLayer() .setName("Bounds for - " + getTitle().toString()) - .setParent(mSurfaceControl) + .setParent(getRenderSurfaceControl()) .build(); setBoundsLayerCrop(); mTransaction.show(mBoundsLayer).apply(); -- cgit v1.2.3