summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceControl.cpp
diff options
context:
space:
mode:
author chaviw <chaviw@google.com> 2017-09-18 16:41:07 -0700
committer chaviw <chaviw@google.com> 2017-09-20 11:52:37 -0700
commitf1961f713de2b3f54c8ce7653964b969e1a02bc8 (patch)
tree00c1a633c54b33a445f8b498f11848ff03d07c0b /libs/gui/SurfaceControl.cpp
parent931dc01ad7c2d3eb1de276a7174cd55928d463aa (diff)
Re-parent invoked on child instead of on parent.
The function to re-parent an individual child is now invoked on the child instead of the parent. This ensures the child ends up with the last parent set if multiple reparent requests are made in the same transaction. This also allows adding a parent to a layer that didn't have one previously. Test: Transaction_test -> Reparent, ReparentToNoParent, ReparentFromNoParent Change-Id: Idab429eb2dca5a4ae1b020a5a7629d719dd4d995
Diffstat (limited to 'libs/gui/SurfaceControl.cpp')
-rw-r--r--libs/gui/SurfaceControl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index b9c5ef9580..d801d12738 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -191,11 +191,10 @@ status_t SurfaceControl::reparentChildren(const sp<IBinder>& newParentHandle) {
return mClient->reparentChildren(mHandle, newParentHandle);
}
-status_t SurfaceControl::reparentChild(const sp<IBinder>& newParentHandle,
- const sp<IBinder>& childHandle) {
+status_t SurfaceControl::reparent(const sp<IBinder>& newParentHandle) {
status_t err = validate();
if (err < 0) return err;
- return mClient->reparentChild(mHandle, newParentHandle, childHandle);
+ return mClient->reparent(mHandle, newParentHandle);
}
status_t SurfaceControl::detachChildren() {