Revert^2 Revert layer proto format back to proto2
Perfetto doesn't support proto3, hence reverted to proto2.
This reverts commit dcc0bab76dbf3156f18e4dd2697aa7220ad7a8e0
Bug: b/284424784
Test: atest libsurfaceflinger_unittest && atest transactiontrace_testsuite
Change-Id: I107a56f57f547056c44877e776d169dd21db618a
diff --git a/services/surfaceflinger/layerproto/LayerProtoParser.cpp b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
index 8d48070..c3d0a40 100644
--- a/services/surfaceflinger/layerproto/LayerProtoParser.cpp
+++ b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
@@ -193,13 +193,13 @@
}
}
- if (layerProto.parent() != -1) {
+ if (layerProto.has_parent()) {
if (layerMap.count(layerProto.parent()) > 0) {
currLayer->parent = layerMap[layerProto.parent()];
}
}
- if (layerProto.z_order_relative_of() != -1) {
+ if (layerProto.has_z_order_relative_of()) {
if (layerMap.count(layerProto.z_order_relative_of()) > 0) {
currLayer->zOrderRelativeOf = layerMap[layerProto.z_order_relative_of()];
}