Loading services/surfaceflinger/Scheduler/Scheduler.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -67,9 +67,14 @@ Scheduler::Scheduler(impl::EventControlThread::SetVSyncEnabledFunction function) mPrimaryDispSync = std::move(primaryDispSync); mEventControlThread = std::make_unique<impl::EventControlThread>(function); mSetIdleTimerMs = set_idle_timer_ms(0); char value[PROPERTY_VALUE_MAX]; property_get("debug.sf.set_idle_timer_ms", value, "0"); int int_value = atoi(value); if (int_value) { mSetIdleTimerMs = atoi(value); } if (mSetIdleTimerMs > 0) { mIdleTimer = Loading services/surfaceflinger/SurfaceFlingerProperties.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,14 @@ int32_t wcg_composition_pixel_format(PixelFormat defaultValue) { return static_cast<int32_t>(defaultValue); } int32_t set_idle_timer_ms(int32_t defaultValue) { auto temp = SurfaceFlingerProperties::set_idle_timer_ms(); if (temp.has_value()) { return *temp; } return defaultValue; } #define DISPLAY_PRIMARY_SIZE 3 constexpr float kSrgbRedX = 0.4123f; Loading services/surfaceflinger/SurfaceFlingerProperties.h +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ int64_t wcg_composition_dataspace( int32_t wcg_composition_pixel_format( android::hardware::graphics::common::V1_2::PixelFormat defaultValue); int32_t set_idle_timer_ms(int32_t defaultValue); android::ui::DisplayPrimaries getDisplayNativePrimaries(); } // namespace sysprop } // namespace android Loading services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop +11 −0 Original line number Diff line number Diff line Loading @@ -286,3 +286,14 @@ prop { access: Readonly prop_name: "ro.surface_flinger.display_primary_white" } # setIdleTimerMs indicates what is considered a timeout in milliseconds for Scheduler. This value is # used by the Scheduler to trigger inactivity callbacks that will switch the display to a lower # refresh rate. Setting this property to 0 means there is no timer. prop { api_name: "set_idle_timer_ms" type: Integer scope: Internal access: Readonly prop_name: "ro.surface_flinger.set_idle_timer_ms" } Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -67,9 +67,14 @@ Scheduler::Scheduler(impl::EventControlThread::SetVSyncEnabledFunction function) mPrimaryDispSync = std::move(primaryDispSync); mEventControlThread = std::make_unique<impl::EventControlThread>(function); mSetIdleTimerMs = set_idle_timer_ms(0); char value[PROPERTY_VALUE_MAX]; property_get("debug.sf.set_idle_timer_ms", value, "0"); int int_value = atoi(value); if (int_value) { mSetIdleTimerMs = atoi(value); } if (mSetIdleTimerMs > 0) { mIdleTimer = Loading
services/surfaceflinger/SurfaceFlingerProperties.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,14 @@ int32_t wcg_composition_pixel_format(PixelFormat defaultValue) { return static_cast<int32_t>(defaultValue); } int32_t set_idle_timer_ms(int32_t defaultValue) { auto temp = SurfaceFlingerProperties::set_idle_timer_ms(); if (temp.has_value()) { return *temp; } return defaultValue; } #define DISPLAY_PRIMARY_SIZE 3 constexpr float kSrgbRedX = 0.4123f; Loading
services/surfaceflinger/SurfaceFlingerProperties.h +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,8 @@ int64_t wcg_composition_dataspace( int32_t wcg_composition_pixel_format( android::hardware::graphics::common::V1_2::PixelFormat defaultValue); int32_t set_idle_timer_ms(int32_t defaultValue); android::ui::DisplayPrimaries getDisplayNativePrimaries(); } // namespace sysprop } // namespace android Loading
services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop +11 −0 Original line number Diff line number Diff line Loading @@ -286,3 +286,14 @@ prop { access: Readonly prop_name: "ro.surface_flinger.display_primary_white" } # setIdleTimerMs indicates what is considered a timeout in milliseconds for Scheduler. This value is # used by the Scheduler to trigger inactivity callbacks that will switch the display to a lower # refresh rate. Setting this property to 0 means there is no timer. prop { api_name: "set_idle_timer_ms" type: Integer scope: Internal access: Readonly prop_name: "ro.surface_flinger.set_idle_timer_ms" }