From dbc31672ea7e7b8e8847db8ef70447de918d5b27 Mon Sep 17 00:00:00 2001 From: Pablo Gamito Date: Tue, 1 Sep 2020 18:28:58 +0000 Subject: 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 --- libs/gui/LayerState.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/gui/LayerState.cpp') diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 6ff4a3d4e2..885f20f434 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -31,6 +31,7 @@ namespace android { 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::write(Parcel& output) const 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); -- cgit v1.2.3-59-g8ed1b