diff options
| author | 2018-03-23 13:43:53 -0700 | |
|---|---|---|
| committer | 2018-03-23 13:43:53 -0700 | |
| commit | 15eae09ebb293135dedce203bcb542a2e6e8d43a (patch) | |
| tree | 599b6c6cdb9d1f22ddd4fcb44e3f3be96c78f9fc /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 14c461a47806524f7bb51273df7d45fb8648b4b7 (diff) | |
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
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 11658e8b49..ba611c6b26 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -4460,9 +4460,9 @@ status_t SurfaceFlinger::captureLayers(const sp<IBinder>& layerHandleBinder, ReparentForDrawing(const sp<Layer>& oldParent, const sp<Layer>& newParent) : oldParent(oldParent), newParent(newParent) { - oldParent->reparentChildrenForDrawing(newParent); + oldParent->setChildrenDrawingParent(newParent); } - ~ReparentForDrawing() { newParent->reparentChildrenForDrawing(oldParent); } + ~ReparentForDrawing() { oldParent->setChildrenDrawingParent(oldParent); } }; void render(std::function<void()> drawLayers) override { |