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/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp
index 56a4ae2..f41243c 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.cpp
+++ b/services/surfaceflinger/Scheduler/Scheduler.cpp
@@ -654,6 +654,10 @@
                                                    mFeatures.test(Feature::kContentDetection));
 }
 
+void Scheduler::setLayerProperties(int32_t id, const android::scheduler::LayerProps& properties) {
+    mLayerHistory.setLayerProperties(id, properties);
+}
+
 void Scheduler::chooseRefreshRateForContent(
         const surfaceflinger::frontend::LayerHierarchy* hierarchy,
         bool updateAttachedChoreographer) {