[sf] use snapshots to update layer history
Avoid directly accessing layer drawing state from layer
history, instead provide a snapshot of the layer data
needed.
Test: atest android.graphics.cts.MatchContentFrameRateTest android.graphics.cts.SetFrameRateTest
Bug: 238781169
Change-Id: I120e89cca70beb9811a8ee9c5c3203f2a5cfabb4
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
index 344dab4..3698943 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
@@ -773,6 +773,7 @@
snapshot.layerOpaqueFlagSet =
(requested.flags & layer_state_t::eLayerOpaque) == layer_state_t::eLayerOpaque;
snapshot.cachingHint = requested.cachingHint;
+ snapshot.frameRateSelectionPriority = requested.frameRateSelectionPriority;
}
if (forceUpdate || snapshot.changes.any(RequestedLayerState::Changes::Content)) {