SF: Track transaction tracing states in order
Need to preserve order when rebuilding layers
from the traces.
Test: TreeHugger
Bug: 200284593
Change-Id: Ie33f9c22f60d3bf3016b04b9b39dcfdb25165364
diff --git a/services/surfaceflinger/Tracing/TransactionTracing.h b/services/surfaceflinger/Tracing/TransactionTracing.h
index 0aa22ed..546ac7a 100644
--- a/services/surfaceflinger/Tracing/TransactionTracing.h
+++ b/services/surfaceflinger/Tracing/TransactionTracing.h
@@ -85,8 +85,7 @@
std::vector<proto::LayerCreationArgs> mCreatedLayers GUARDED_BY(mTraceLock);
std::unordered_map<BBinder* /* layerHandle */, int32_t /* layerId */> mLayerHandles
GUARDED_BY(mTraceLock);
- std::unordered_map<int32_t /* layerId */, TracingLayerState> mStartingStates
- GUARDED_BY(mTraceLock);
+ std::map<int32_t /* layerId */, TracingLayerState> mStartingStates GUARDED_BY(mTraceLock);
// We do not want main thread to block so main thread will try to acquire mMainThreadLock,
// otherwise will push data to temporary container.