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/TransactionProtoParser.h b/services/surfaceflinger/Tracing/TransactionProtoParser.h
index bb0b134..d589936 100644
--- a/services/surfaceflinger/Tracing/TransactionProtoParser.h
+++ b/services/surfaceflinger/Tracing/TransactionProtoParser.h
@@ -60,8 +60,8 @@
     static TransactionState fromProto(const proto::TransactionState&,
                                       LayerIdToHandleFn getLayerHandleFn,
                                       DisplayIdToHandleFn getDisplayHandleFn);
-    static void fromProto(const proto::LayerState&, LayerIdToHandleFn getLayerHandleFn,
-                          TracingLayerState& outState);
+    static void mergeFromProto(const proto::LayerState&, LayerIdToHandleFn getLayerHandleFn,
+                               TracingLayerState& outState);
     static void fromProto(const proto::LayerCreationArgs&, TracingLayerCreationArgs& outArgs);
 
 private: