Add LayerId to SurfaceControl and LayerState when created
Allows us to then dump the LayerState on transaction merges and have an id to associate the LayerState with a layer
Test: Check if layer id is available in the LayerState when we dump the LayerState on merges
Change-Id: I5046835d6a82574110125c7dbdf2098bd10ac296
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 6ff4a3d..885f20f 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -31,6 +31,7 @@
status_t layer_state_t::write(Parcel& output) const
{
SAFE_PARCEL(output.writeStrongBinder, surface);
+ SAFE_PARCEL(output.writeInt32, layerId);
SAFE_PARCEL(output.writeUint64, what);
SAFE_PARCEL(output.writeFloat, x);
SAFE_PARCEL(output.writeFloat, y);
@@ -114,6 +115,7 @@
status_t layer_state_t::read(const Parcel& input)
{
SAFE_PARCEL(input.readNullableStrongBinder, &surface);
+ SAFE_PARCEL(input.readInt32, &layerId);
SAFE_PARCEL(input.readUint64, &what);
SAFE_PARCEL(input.readFloat, &x);
SAFE_PARCEL(input.readFloat, &y);