Update LayerHistory layer properties when they change
Previously we would only update LayerHistory when framerate
changed or there was a buffer update. This occasionally lead to
an incorrect frame rate being calculated with stale data. Fix this
by updating layer properties when ever they change.
Fixes: 306710286, 306716374
Test: presubmit
Test: atest CtsSurfaceControlTests CtsSurfaceControlTestsStaging
Test: displays runs at 60fps when maps is running after screenrotation
Change-Id: I14388ca69eb6f940c436f88d55cff689e51bc238
diff --git a/services/surfaceflinger/Scheduler/LayerHistory.h b/services/surfaceflinger/Scheduler/LayerHistory.h
index bac1ec6..5a9445b 100644
--- a/services/surfaceflinger/Scheduler/LayerHistory.h
+++ b/services/surfaceflinger/Scheduler/LayerHistory.h
@@ -73,7 +73,7 @@
// does not set a preference for refresh rate.
void setDefaultFrameRateCompatibility(int32_t id, FrameRateCompatibility frameRateCompatibility,
bool contentDetectionEnabled);
-
+ void setLayerProperties(int32_t id, const LayerProps&);
using Summary = std::vector<RefreshRateSelector::LayerRequirement>;
// Rebuilds sets of active/inactive layers, and accumulates stats for active layers.