From 15eae09ebb293135dedce203bcb542a2e6e8d43a Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Fri, 23 Mar 2018 13:43:53 -0700 Subject: SurfaceFlinger: Fix reparenting following ReparentForDrawing Counterintuitively, the new-parent doesn't have the children in it's child list so even when cleaning up we need to call reparentChildrenForDrawing on the old parent instead of the new parent. Also clarify name to make this more obvious and add test. Test: Transaction_test.cpp Bug: 76099859 Change-Id: I935eec303dba320b5a2731606ec862311c5ca43e --- services/surfaceflinger/Layer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/surfaceflinger/Layer.cpp') diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 44e60edb37..699c85caf9 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1594,7 +1594,7 @@ bool Layer::reparentChildren(const sp& newParentHandle) { return true; } -void Layer::reparentChildrenForDrawing(const sp& newParent) { +void Layer::setChildrenDrawingParent(const sp& newParent) { for (const sp& child : mDrawingChildren) { child->mDrawingParent = newParent; } -- cgit v1.2.3-59-g8ed1b