summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2023-01-27 21:12:16 -0800
committer Ady Abraham <adyabr@google.com> 2023-02-02 16:16:36 -0800
commit0c8b723827e997bb21c1b11919b84ea6905066b4 (patch)
treec71c0b2860cb7ebce4708f445b09e05f83eb0859
parentb26a66d93d4f53ba3a4e88c460efb6f06ae2cbf7 (diff)
SF: cleanup frame rate override sysprops
Bug: 260875485 Test: atest FrameRateOverrideHostTest Change-Id: Ic2b01c4e0db348274e34b3e7ddecfc60414892dc
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp21
-rw-r--r--services/surfaceflinger/SurfaceFlingerProperties.cpp8
-rw-r--r--services/surfaceflinger/SurfaceFlingerProperties.h4
-rw-r--r--services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop22
-rw-r--r--services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt8
5 files changed, 4 insertions, 59 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index a0c3eb0e26..927a9b7675 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3139,23 +3139,10 @@ sp<DisplayDevice> SurfaceFlinger::setupNewDisplayDeviceInternal(
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 5b7303090d..20fa091730 100644
--- a/services/surfaceflinger/SurfaceFlingerProperties.cpp
+++ b/services/surfaceflinger/SurfaceFlingerProperties.cpp
@@ -367,14 +367,6 @@ bool enable_frame_rate_override(bool defaultValue) {
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 09629cf93e..080feee686 100644
--- a/services/surfaceflinger/SurfaceFlingerProperties.h
+++ b/services/surfaceflinger/SurfaceFlingerProperties.h
@@ -96,10 +96,6 @@ bool update_device_product_info_on_hotplug_reconnect(bool defaultValue);
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 8540c3dcfc..bcbe21a483 100644
--- a/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop
+++ b/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop
@@ -445,28 +445,6 @@ prop {
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 93381333a8..348a462038 100644
--- a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt
+++ b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt
@@ -61,14 +61,6 @@ props {
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"
}