Loading services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include <utils/Trace.h> #include <chrono> #include <cmath> #include "../SurfaceFlingerProperties.h" #undef LOG_TAG #define LOG_TAG "RefreshRateConfigs" Loading Loading @@ -555,6 +556,7 @@ RefreshRateConfigs::RefreshRateConfigs( mMaxSupportedRefreshRate = sortedConfigs.back(); mSupportsFrameRateOverride = false; if (android::sysprop::enable_frame_rate_override(true)) { for (const auto& config1 : sortedConfigs) { for (const auto& config2 : sortedConfigs) { if (getFrameRateDivider(config1->getFps(), config2->getFps()) >= 2) { Loading @@ -563,6 +565,8 @@ RefreshRateConfigs::RefreshRateConfigs( } } } } constructAvailableRefreshRates(); } Loading services/surfaceflinger/SurfaceFlingerProperties.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -376,5 +376,9 @@ bool update_device_product_info_on_hotplug_reconnect(bool defaultValue) { defaultValue); } bool enable_frame_rate_override(bool defaultValue) { return SurfaceFlingerProperties::enable_frame_rate_override().value_or(defaultValue); } } // namespace sysprop } // namespace android services/surfaceflinger/SurfaceFlingerProperties.h +2 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,8 @@ android::ui::DisplayPrimaries getDisplayNativePrimaries(); bool update_device_product_info_on_hotplug_reconnect(bool defaultValue); bool enable_frame_rate_override(bool defaultValue); } // namespace sysprop } // namespace android #endif // SURFACEFLINGERPROPERTIES_H_ services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop +9 −0 Original line number Diff line number Diff line Loading @@ -445,3 +445,12 @@ prop { access: Readonly prop_name: "ro.surface_flinger.update_device_product_info_on_hotplug_reconnect" } # Enables the frame rate override feature prop { api_name: "enable_frame_rate_override" type: Boolean scope: Public access: Readonly prop_name: "ro.surface_flinger.enable_frame_rate_override" } services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,10 @@ props { type: Integer prop_name: "ro.surface_flinger.display_update_imminent_timeout_ms" } prop { api_name: "enable_frame_rate_override" prop_name: "ro.surface_flinger.enable_frame_rate_override" } prop { api_name: "enable_protected_contents" prop_name: "ro.surface_flinger.protected_contents" Loading Loading
services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include <utils/Trace.h> #include <chrono> #include <cmath> #include "../SurfaceFlingerProperties.h" #undef LOG_TAG #define LOG_TAG "RefreshRateConfigs" Loading Loading @@ -555,6 +556,7 @@ RefreshRateConfigs::RefreshRateConfigs( mMaxSupportedRefreshRate = sortedConfigs.back(); mSupportsFrameRateOverride = false; if (android::sysprop::enable_frame_rate_override(true)) { for (const auto& config1 : sortedConfigs) { for (const auto& config2 : sortedConfigs) { if (getFrameRateDivider(config1->getFps(), config2->getFps()) >= 2) { Loading @@ -563,6 +565,8 @@ RefreshRateConfigs::RefreshRateConfigs( } } } } constructAvailableRefreshRates(); } Loading
services/surfaceflinger/SurfaceFlingerProperties.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -376,5 +376,9 @@ bool update_device_product_info_on_hotplug_reconnect(bool defaultValue) { defaultValue); } bool enable_frame_rate_override(bool defaultValue) { return SurfaceFlingerProperties::enable_frame_rate_override().value_or(defaultValue); } } // namespace sysprop } // namespace android
services/surfaceflinger/SurfaceFlingerProperties.h +2 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,8 @@ android::ui::DisplayPrimaries getDisplayNativePrimaries(); bool update_device_product_info_on_hotplug_reconnect(bool defaultValue); bool enable_frame_rate_override(bool defaultValue); } // namespace sysprop } // namespace android #endif // SURFACEFLINGERPROPERTIES_H_
services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop +9 −0 Original line number Diff line number Diff line Loading @@ -445,3 +445,12 @@ prop { access: Readonly prop_name: "ro.surface_flinger.update_device_product_info_on_hotplug_reconnect" } # Enables the frame rate override feature prop { api_name: "enable_frame_rate_override" type: Boolean scope: Public access: Readonly prop_name: "ro.surface_flinger.enable_frame_rate_override" }
services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,10 @@ props { type: Integer prop_name: "ro.surface_flinger.display_update_imminent_timeout_ms" } prop { api_name: "enable_frame_rate_override" prop_name: "ro.surface_flinger.enable_frame_rate_override" } prop { api_name: "enable_protected_contents" prop_name: "ro.surface_flinger.protected_contents" Loading