[sf] Use layer id as snapshot ids
Flicker tests rely on layer ids for some assertions. So when possible
use the layer id for the snapshot used to generate layer traces.
Also keep track of the order in which layers are added so its easier to
write tests.
Test: atest FlickerTests w/new fe
Bug: 238781169
Change-Id: Ie0f93ca956e6d043c9d95d00bc205d242e47c4cc
diff --git a/services/surfaceflinger/FrontEnd/LayerCreationArgs.h b/services/surfaceflinger/FrontEnd/LayerCreationArgs.h
index 3a0fc6d..c26edb5 100644
--- a/services/surfaceflinger/FrontEnd/LayerCreationArgs.h
+++ b/services/surfaceflinger/FrontEnd/LayerCreationArgs.h
@@ -36,6 +36,7 @@
struct LayerCreationArgs {
static std::atomic<uint32_t> sSequence;
+ static std::atomic<uint32_t> sInternalSequence;
static uint32_t getInternalLayerId(uint32_t id);
static LayerCreationArgs fromOtherArgs(const LayerCreationArgs& other);