Add a re-parent function to re-parent a specific child.
This is similar to reparentChildren, but the reparentChild will
only re-parent a specific child to the new parent and not all
children.
Test: Added test in Transaction_test for reparentChild.
Change-Id: I4275e0d5f1d5601b489956753c78a56d1a5d4c1c
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 9b06e63..573f685 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -45,6 +45,8 @@
output.writeInt32(overrideScalingMode);
output.writeStrongBinder(IInterface::asBinder(barrierGbp));
output.writeStrongBinder(relativeLayerHandle);
+ output.writeStrongBinder(parentHandleForChild);
+ output.writeStrongBinder(childHandle);
output.write(transparentRegion);
return NO_ERROR;
}
@@ -77,6 +79,8 @@
barrierGbp =
interface_cast<IGraphicBufferProducer>(input.readStrongBinder());
relativeLayerHandle = input.readStrongBinder();
+ parentHandleForChild = input.readStrongBinder();
+ childHandle = input.readStrongBinder();
input.read(transparentRegion);
return NO_ERROR;
}