SF: Fix transaction trace merging
As entries get purged from the ring buffer, they need to be
merged in order to update the starting state. The tracing logic
tried to update the state directly from proto to be more
efficient. But this introduced slight changes in behavior.
Fix by reusing layerstate merge logic.
Test: atest TransactionProtoParserTest
Bug: 200284593
Change-Id: I8bfcf23c43fa89f3e5c4e899c5c8942d098bbe7f
diff --git a/services/surfaceflinger/Tracing/TransactionTracing.cpp b/services/surfaceflinger/Tracing/TransactionTracing.cpp
index c126911..d2759ca 100644
--- a/services/surfaceflinger/Tracing/TransactionTracing.cpp
+++ b/services/surfaceflinger/Tracing/TransactionTracing.cpp
@@ -332,7 +332,7 @@
ALOGW("Could not find layer id %d", layerState.layer_id());
continue;
}
- TransactionProtoParser::fromProto(layerState, nullptr, it->second);
+ TransactionProtoParser::mergeFromProto(layerState, nullptr, it->second);
}
}