SF: cleanup frame rate override sysprops
Bug: 260875485
Test: atest FrameRateOverrideHostTest
Change-Id: Ic2b01c4e0db348274e34b3e7ddecfc60414892dc
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index a0c3eb0..927a9b7 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3139,23 +3139,10 @@
const auto [kernelIdleTimerController, idleTimerTimeoutMs] =
getKernelIdleTimerProperties(compositionDisplay->getId());
- const auto enableFrameRateOverride = [&] {
- using Config = scheduler::RefreshRateSelector::Config;
- if (!sysprop::enable_frame_rate_override(true)) {
- return Config::FrameRateOverride::Disabled;
- }
-
- if (sysprop::frame_rate_override_for_native_rates(false)) {
- return Config::FrameRateOverride::AppOverrideNativeRefreshRates;
- }
-
- if (!sysprop::frame_rate_override_global(true)) {
- return Config::FrameRateOverride::AppOverride;
- }
-
- return Config::FrameRateOverride::Enabled;
- }();
-
+ using Config = scheduler::RefreshRateSelector::Config;
+ const auto enableFrameRateOverride = sysprop::enable_frame_rate_override(true)
+ ? Config::FrameRateOverride::Enabled
+ : Config::FrameRateOverride::Disabled;
scheduler::RefreshRateSelector::Config config =
{.enableFrameRateOverride = enableFrameRateOverride,
.frameRateMultipleThreshold =
diff --git a/services/surfaceflinger/SurfaceFlingerProperties.cpp b/services/surfaceflinger/SurfaceFlingerProperties.cpp
index 5b73030..20fa091 100644
--- a/services/surfaceflinger/SurfaceFlingerProperties.cpp
+++ b/services/surfaceflinger/SurfaceFlingerProperties.cpp
@@ -367,14 +367,6 @@
return SurfaceFlingerProperties::enable_frame_rate_override().value_or(defaultValue);
}
-bool frame_rate_override_for_native_rates(bool defaultValue) {
- return SurfaceFlingerProperties::frame_rate_override_for_native_rates().value_or(defaultValue);
-}
-
-bool frame_rate_override_global(bool defaultValue) {
- return SurfaceFlingerProperties::frame_rate_override_global().value_or(defaultValue);
-}
-
bool enable_layer_caching(bool defaultValue) {
return SurfaceFlingerProperties::enable_layer_caching().value_or(defaultValue);
}
diff --git a/services/surfaceflinger/SurfaceFlingerProperties.h b/services/surfaceflinger/SurfaceFlingerProperties.h
index 09629cf..080feee 100644
--- a/services/surfaceflinger/SurfaceFlingerProperties.h
+++ b/services/surfaceflinger/SurfaceFlingerProperties.h
@@ -96,10 +96,6 @@
bool enable_frame_rate_override(bool defaultValue);
-bool frame_rate_override_for_native_rates(bool defaultValue);
-
-bool frame_rate_override_global(bool defaultValue);
-
bool enable_layer_caching(bool defaultValue);
bool enable_sdr_dimming(bool defaultValue);
diff --git a/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop b/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop
index 8540c3d..bcbe21a 100644
--- a/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop
+++ b/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop
@@ -445,28 +445,6 @@
prop_name: "ro.surface_flinger.enable_frame_rate_override"
}
-# Limits the frame rate override feature (enable_frame_rate_override) to override the refresh rate
-# to native display refresh rates only. Before introducing this flag, native display refresh rates
-# was the default behaviour. With this flag we can control which behaviour we want explicitly.
-# This flag is introduced as a fail-safe mechanism and planned to be defaulted to false.
-prop {
- api_name: "frame_rate_override_for_native_rates"
- type: Boolean
- scope: Public
- access: Readonly
- prop_name: "ro.surface_flinger.frame_rate_override_for_native_rates"
-}
-
-# Enables the frame rate override feature (enable_frame_rate_override) to
-# override the frame rate globally instead of only for individual apps.
-prop {
- api_name: "frame_rate_override_global"
- type: Boolean
- scope: Public
- access: Readonly
- prop_name: "ro.surface_flinger.frame_rate_override_global"
-}
-
# Enables Layer Caching
prop {
api_name: "enable_layer_caching"
diff --git a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt
index 9338133..348a462 100644
--- a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt
+++ b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt
@@ -61,14 +61,6 @@
prop_name: "ro.surface_flinger.force_hwc_copy_for_virtual_displays"
}
prop {
- api_name: "frame_rate_override_for_native_rates"
- prop_name: "ro.surface_flinger.frame_rate_override_for_native_rates"
- }
- prop {
- api_name: "frame_rate_override_global"
- prop_name: "ro.surface_flinger.frame_rate_override_global"
- }
- prop {
api_name: "has_HDR_display"
prop_name: "ro.surface_flinger.has_HDR_display"
}