summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2020-07-10 12:46:21 -0700
committer chaviw <chaviw@google.com> 2020-07-10 12:51:56 -0700
commit5e1e8f27b7fd8b26727bba1fd7b7d6c35c4e4ac5 (patch)
tree1b32e5d871574a87ef04346e9a2cf62e0f0ab185 /libs/gui/SurfaceComposerClient.cpp
parentc6a2f3a47d46c990105d58d6e3707b189605cbc1 (diff)
Only attach descendants if parent was detached
If a layer is reparented, we also attach the children. We traverse down the heirarchy and attach all descendants. However, we really only want to attach descendants if they were initially detached because the layer that's getting reparented detached them. For example, Child called detachChildren and its Grandchild was detached. Parent calls reparent. We want to attach Child if it was detached and then proceed down its children. If Child wasn't detached, we don't want to attach Grandchild since the layer that detached it hasn't been reparented. As cleanup, also moved DetachChildren test to their own file Test: DetachChildren.ReparentParentLayerOfDetachedChildren Change-Id: I53b6d9cb165b810e9c55da8a9ba86c7b53a13c0e
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
0 files changed, 0 insertions, 0 deletions