diff options
author | 2021-10-28 16:34:42 +0200 | |
---|---|---|
committer | 2021-10-28 18:09:17 +0200 | |
commit | 82de19bc5532d68df8f497062882d8d594a4f8f2 (patch) | |
tree | c07dee9e837c126478d53692c6089aad2bdef3cd | |
parent | ccfc0b73ad209627efa7eb8039ff3dd881f4915b (diff) |
Remove dead code around use_frame_rate_api
There's no se polixy for ro.surface_flinger.use_frame_rate_api
and it cannot be used by vendors, so the code is dead. Removing
it cos there isn't a use case for disabling this API.
Bug: 199911262
Test: n/a
Change-Id: I45aabf5ced73d565a5d7adc73971f3615dde0abe
10 files changed, 0 insertions, 42 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 388181c231..94781751fb 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1157,9 +1157,6 @@ void Layer::updateTreeHasFrameRateVote() { } bool Layer::setFrameRate(FrameRate frameRate) { - if (!mFlinger->useFrameRateApi) { - return false; - } if (mDrawingState.frameRate == frameRate) { return false; } diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 8d7221c1dc..0626e7c810 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -339,7 +339,6 @@ Dataspace SurfaceFlinger::defaultCompositionDataspace = Dataspace::V0_SRGB; ui::PixelFormat SurfaceFlinger::defaultCompositionPixelFormat = ui::PixelFormat::RGBA_8888; Dataspace SurfaceFlinger::wideColorGamutCompositionDataspace = Dataspace::V0_SRGB; ui::PixelFormat SurfaceFlinger::wideColorGamutCompositionPixelFormat = ui::PixelFormat::RGBA_8888; -bool SurfaceFlinger::useFrameRateApi; bool SurfaceFlinger::enableSdrDimming; bool SurfaceFlinger::enableLatchUnsignaled; @@ -494,8 +493,6 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI android::hardware::details::setTrebleTestingOverride(true); } - useFrameRateApi = use_frame_rate_api(true); - mRefreshRateOverlaySpinner = property_get_bool("sf.debug.show_refresh_rate_overlay_spinner", 0); // Debug property overrides ro. property diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index 276c7f6bfe..f67c8813a7 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -246,11 +246,6 @@ public: static ui::Dataspace wideColorGamutCompositionDataspace; static ui::PixelFormat wideColorGamutCompositionPixelFormat; - // Whether to use frame rate API when deciding about the refresh rate of the display. This - // variable is caches in SF, so that we can check it with each layer creation, and a void the - // overhead that is caused by reading from sysprop. - static bool useFrameRateApi; - static constexpr SkipInitializationTag SkipInitialization; // Whether or not SDR layers should be dimmed to the desired SDR white point instead of diff --git a/services/surfaceflinger/SurfaceFlingerProperties.cpp b/services/surfaceflinger/SurfaceFlingerProperties.cpp index a8117f7f57..16f6e31946 100644 --- a/services/surfaceflinger/SurfaceFlingerProperties.cpp +++ b/services/surfaceflinger/SurfaceFlingerProperties.cpp @@ -304,14 +304,6 @@ bool support_kernel_idle_timer(bool defaultValue) { return defaultValue; } -bool use_frame_rate_api(bool defaultValue) { - auto temp = SurfaceFlingerProperties::use_frame_rate_api(); - if (temp.has_value()) { - return *temp; - } - return defaultValue; -} - bool enable_sdr_dimming(bool defaultValue) { return SurfaceFlingerProperties::enable_sdr_dimming().value_or(defaultValue); } diff --git a/services/surfaceflinger/SurfaceFlingerProperties.h b/services/surfaceflinger/SurfaceFlingerProperties.h index ed182608fb..8d0e4263b1 100644 --- a/services/surfaceflinger/SurfaceFlingerProperties.h +++ b/services/surfaceflinger/SurfaceFlingerProperties.h @@ -88,8 +88,6 @@ bool enable_protected_contents(bool defaultValue); bool support_kernel_idle_timer(bool defaultValue); -bool use_frame_rate_api(bool defaultValue); - int32_t display_update_imminent_timeout_ms(int32_t defaultValue); android::ui::DisplayPrimaries getDisplayNativePrimaries(); diff --git a/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop b/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop index 78f8a2f0ae..7702ea240b 100644 --- a/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop +++ b/services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop @@ -414,16 +414,6 @@ prop { prop_name: "ro.surface_flinger.supports_background_blur" } -# Indicates whether Scheduler should use frame rate API when adjusting the -# display refresh rate. -prop { - api_name: "use_frame_rate_api" - type: Boolean - scope: Public - access: Readonly - prop_name: "ro.surface_flinger.use_frame_rate_api" -} - # Sets the timeout used to rate limit DISPLAY_UPDATE_IMMINENT Power HAL notifications. # SurfaceFlinger wakeups will trigger this boost whenever they are separated by more than this # duration (specified in milliseconds). A value of 0 disables the rate limit, and will result in diff --git a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt index 9c567d6afa..bf1e7e2908 100644 --- a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt +++ b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt @@ -152,10 +152,6 @@ props { prop_name: "ro.surface_flinger.use_context_priority" } prop { - api_name: "use_frame_rate_api" - prop_name: "ro.surface_flinger.use_frame_rate_api" - } - prop { api_name: "use_smart_90_for_video" prop_name: "ro.surface_flinger.use_smart_90_for_video" deprecated: true diff --git a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt index ba60a7defb..640b9fb163 100644 --- a/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt +++ b/services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-latest.txt @@ -136,10 +136,6 @@ props { prop_name: "ro.surface_flinger.use_context_priority" } prop { - api_name: "use_frame_rate_api" - prop_name: "ro.surface_flinger.use_frame_rate_api" - } - prop { api_name: "use_smart_90_for_video" prop_name: "ro.surface_flinger.use_smart_90_for_video" deprecated: true diff --git a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp index 3b409658d7..d0211780ab 100644 --- a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp +++ b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp @@ -122,8 +122,6 @@ SetFrameRateTest::SetFrameRateTest() { ::testing::UnitTest::GetInstance()->current_test_info(); ALOGD("**** Setting up for %s.%s\n", test_info->test_case_name(), test_info->name()); - mFlinger.mutableUseFrameRateApi() = true; - setupScheduler(); mFlinger.setupComposer(std::make_unique<Hwc2::mock::Composer>()); diff --git a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h index c23fcc7d58..2c48779b9d 100644 --- a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h +++ b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h @@ -445,7 +445,6 @@ public: auto& mutableHwcDisplayData() { return getHwComposer().mDisplayData; } auto& mutableHwcPhysicalDisplayIdMap() { return getHwComposer().mPhysicalDisplayIdMap; } auto& mutablePrimaryHwcDisplayId() { return getHwComposer().mPrimaryHwcDisplayId; } - auto& mutableUseFrameRateApi() { return mFlinger->useFrameRateApi; } auto& mutableActiveDisplayToken() { return mFlinger->mActiveDisplayToken; } auto fromHandle(const sp<IBinder>& handle) { |