Track pendingBuffer count in RequestedLayerState
Allows for easier retrieval without added lock contention.
RequestedLayerState stores a pointer to the original
buffer count from legacy layer.
Bug: b/294922229
Test: presubmit
Flag: EXEMPT, mechanical refactor
Change-Id: Iaab1b2214cc670f6e2d385ba4aba31e635a34030
diff --git a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
index 5734ccf..96d8fbf 100644
--- a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
+++ b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
@@ -56,7 +56,8 @@
ownerUid(args.ownerUid),
ownerPid(args.ownerPid),
parentId(args.parentId),
- layerIdToMirror(args.layerIdToMirror) {
+ layerIdToMirror(args.layerIdToMirror),
+ pendingBuffers(args.pendingBuffers) {
layerId = static_cast<int32_t>(args.sequence);
changes |= RequestedLayerState::Changes::Created;
metadata.merge(args.metadata);