SF: Flag guard setFrameRate() API
- LayerHistory is now always created
- Do not use LayerHistory when content detection flag is turned off.
Bug: 148428554
Test: atest CtsGraphicsTestCases:SetFrameRateTest
Test: Play YouTube video. When content detection flag is off,
display runs at 90, otherwise at 60.
Test: adb shell /data/.../libsurfaceflinger_unittest
Change-Id: Iab8b79e16a5257c770d9ddd204cfe26d22de83b6
diff --git a/services/surfaceflinger/Scheduler/Scheduler.h b/services/surfaceflinger/Scheduler/Scheduler.h
index 01062f8..c2345cc 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.h
+++ b/services/surfaceflinger/Scheduler/Scheduler.h
@@ -177,7 +177,10 @@
void setVsyncPeriod(nsecs_t period);
- HwcConfigIndexType calculateRefreshRateType() REQUIRES(mFeatureStateLock);
+ // This function checks whether individual features that are affecting the refresh rate
+ // selection were initialized, prioritizes them, and calculates the HwcConfigIndexType
+ // for the suggested refresh rate.
+ HwcConfigIndexType calculateRefreshRateConfigIndexType() REQUIRES(mFeatureStateLock);
bool layerHistoryHasClientSpecifiedFrameRate() REQUIRES(mFeatureStateLock);