Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bce6ffd5 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

SF: Reparent for screehshots should only be called on old parent layers

During a reparenting, a parent's children do not change, instead only the child's
reference to its parents change.

Bug: 124389032, 124372894
Test: go/wm-smoke
Test:build and run aosp_cf_x86_pasan
Change-Id: Ibceb036b8927eef143d9e544ac850c7c6379e1fe
parent 101843de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5583,7 +5583,7 @@ status_t SurfaceFlinger::captureLayers(const sp<IBinder>& layerHandleBinder,
                newParent->computeBounds(drawingBounds.toFloatRect(), ui::Transform());
                oldParent->setChildrenDrawingParent(newParent);
            }
            ~ReparentForDrawing() { newParent->setChildrenDrawingParent(oldParent); }
            ~ReparentForDrawing() { oldParent->setChildrenDrawingParent(oldParent); }
        };

        void render(std::function<void()> drawLayers) override {