SF: give a higher score to frame rates which exact matches
To avoid cases where devices with very close refresh rates
(such as 53Hz and 55Hz) gives the same score for these,
assign a small (0.99) factor to frame rate that are
not exact match of a multiple of the refresh rate
Test: atest FrameRateCtsActivity
Test: atest RefreshRateConfigsTest
Bug: 190578904
Change-Id: Idd32600ccacc0cad8f44c9d9373e50a333663717
diff --git a/services/surfaceflinger/Scheduler/RefreshRateConfigs.h b/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
index 0d75689..8b895f5 100644
--- a/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
+++ b/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
@@ -405,6 +405,9 @@
float calculateLayerScoreLocked(const LayerRequirement&, const RefreshRate&,
bool isSeamlessSwitch) const REQUIRES(mLock);
+ float calculateNonExactMatchingLayerScoreLocked(const LayerRequirement&,
+ const RefreshRate&) const REQUIRES(mLock);
+
void updateDisplayModes(const DisplayModes& mode, DisplayModeId currentModeId) EXCLUDES(mLock);
// The list of refresh rates, indexed by display modes ID. This may change after this