SurfaceFlinger: optimize frame rate override
On devices that frame rate override cannot be supported
as the device doesn't support refresh rates that are divisors of
each other, there is no point in trying to find a a frame rate override.
Bug: 170502573
Test: atest FrameRateOverrideHostTest
Change-Id: Idfce2573ee58fa695e81a00c85206990baad978e
diff --git a/services/surfaceflinger/Scheduler/RefreshRateConfigs.h b/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
index 6c83f8b..e4bbf7f 100644
--- a/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
+++ b/services/surfaceflinger/Scheduler/RefreshRateConfigs.h
@@ -318,6 +318,8 @@
// refresh rates.
KernelIdleTimerAction getIdleTimerAction() const;
+ bool supportsFrameRateOverride() const { return mSupportsFrameRateOverride; }
+
// Returns a divider for the current refresh rate
int getRefreshRateDivider(Fps frameRate) const EXCLUDES(mLock);
@@ -405,6 +407,8 @@
// A sorted list of known frame rates that a Heuristic layer will choose
// from based on the closest value.
const std::vector<Fps> mKnownFrameRates;
+
+ bool mSupportsFrameRateOverride;
};
} // namespace android::scheduler