Loading services/surfaceflinger/Scheduler/Scheduler.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ Scheduler::Scheduler(impl::EventControlThread::SetVSyncEnabledFunction function, mUseContentDetectionV2(useContentDetectionV2) { using namespace sysprop; if (property_get_bool("debug.sf.use_smart_90_for_video", 0) || use_smart_90_for_video(false)) { if (property_get_bool("debug.sf.use_content_detection_for_refresh_rate", 0) || use_content_detection_for_refresh_rate(false)) { if (mUseContentDetectionV2) { mLayerHistory = std::make_unique<scheduler::impl::LayerHistoryV2>(); } else { Loading services/surfaceflinger/SurfaceFlingerProperties.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h> #include <android/hardware/configstore/1.1/types.h> #include <configstore/Utils.h> #include <utils/Log.h> #include <log/log.h> #include <cstdlib> Loading Loading @@ -263,8 +264,17 @@ int32_t set_display_power_timer_ms(int32_t defaultValue) { return defaultValue; } bool use_smart_90_for_video(bool defaultValue) { auto temp = SurfaceFlingerProperties::use_smart_90_for_video(); bool use_content_detection_for_refresh_rate(bool defaultValue) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" auto smart_90_deprecated = SurfaceFlingerProperties::use_smart_90_for_video(); #pragma clang diagnostic pop if (smart_90_deprecated.has_value()) { ALOGW("Using deprecated use_smart_90_for_video sysprop. Value: %d", *smart_90_deprecated); return *smart_90_deprecated; } auto temp = SurfaceFlingerProperties::use_content_detection_for_refresh_rate(); if (temp.has_value()) { return *temp; } Loading services/surfaceflinger/SurfaceFlingerProperties.h +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ int32_t set_touch_timer_ms(int32_t defaultValue); int32_t set_display_power_timer_ms(int32_t defaultValue); bool use_smart_90_for_video(bool defaultValue); bool use_content_detection_for_refresh_rate(bool defaultValue); bool enable_protected_contents(bool defaultValue); Loading services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop +12 −0 Original line number Diff line number Diff line Loading @@ -345,14 +345,26 @@ prop { prop_name: "ro.surface_flinger.set_display_power_timer_ms" } # useContentDetectionForRefreshRate indicates whether Scheduler should detect content FPS, and try # to adjust the screen refresh rate based on that. prop { api_name: "use_content_detection_for_refresh_rate" type: Boolean scope: Public access: Readonly prop_name: "ro.surface_flinger.use_content_detection_for_refresh_rate" } # useSmart90ForVideo indicates whether Scheduler should detect content FPS, and try to adjust the # screen refresh rate based on that. # Replaced by useContentDetectionForRefreshRate prop { api_name: "use_smart_90_for_video" type: Boolean scope: Public access: Readonly prop_name: "ro.surface_flinger.use_smart_90_for_video" deprecated: true } prop { Loading services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ props { api_name: "use_color_management" prop_name: "ro.surface_flinger.use_color_management" } prop { api_name: "use_content_detection_for_refresh_rate" prop_name: "ro.surface_flinger.use_content_detection_for_refresh_rate" } prop { api_name: "use_context_priority" prop_name: "ro.surface_flinger.use_context_priority" Loading @@ -119,6 +123,7 @@ props { prop { api_name: "use_smart_90_for_video" prop_name: "ro.surface_flinger.use_smart_90_for_video" deprecated: true } prop { api_name: "use_vr_flinger" Loading Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ Scheduler::Scheduler(impl::EventControlThread::SetVSyncEnabledFunction function, mUseContentDetectionV2(useContentDetectionV2) { using namespace sysprop; if (property_get_bool("debug.sf.use_smart_90_for_video", 0) || use_smart_90_for_video(false)) { if (property_get_bool("debug.sf.use_content_detection_for_refresh_rate", 0) || use_content_detection_for_refresh_rate(false)) { if (mUseContentDetectionV2) { mLayerHistory = std::make_unique<scheduler::impl::LayerHistoryV2>(); } else { Loading
services/surfaceflinger/SurfaceFlingerProperties.cpp +12 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h> #include <android/hardware/configstore/1.1/types.h> #include <configstore/Utils.h> #include <utils/Log.h> #include <log/log.h> #include <cstdlib> Loading Loading @@ -263,8 +264,17 @@ int32_t set_display_power_timer_ms(int32_t defaultValue) { return defaultValue; } bool use_smart_90_for_video(bool defaultValue) { auto temp = SurfaceFlingerProperties::use_smart_90_for_video(); bool use_content_detection_for_refresh_rate(bool defaultValue) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" auto smart_90_deprecated = SurfaceFlingerProperties::use_smart_90_for_video(); #pragma clang diagnostic pop if (smart_90_deprecated.has_value()) { ALOGW("Using deprecated use_smart_90_for_video sysprop. Value: %d", *smart_90_deprecated); return *smart_90_deprecated; } auto temp = SurfaceFlingerProperties::use_content_detection_for_refresh_rate(); if (temp.has_value()) { return *temp; } Loading
services/surfaceflinger/SurfaceFlingerProperties.h +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ int32_t set_touch_timer_ms(int32_t defaultValue); int32_t set_display_power_timer_ms(int32_t defaultValue); bool use_smart_90_for_video(bool defaultValue); bool use_content_detection_for_refresh_rate(bool defaultValue); bool enable_protected_contents(bool defaultValue); Loading
services/surfaceflinger/sysprop/SurfaceFlingerProperties.sysprop +12 −0 Original line number Diff line number Diff line Loading @@ -345,14 +345,26 @@ prop { prop_name: "ro.surface_flinger.set_display_power_timer_ms" } # useContentDetectionForRefreshRate indicates whether Scheduler should detect content FPS, and try # to adjust the screen refresh rate based on that. prop { api_name: "use_content_detection_for_refresh_rate" type: Boolean scope: Public access: Readonly prop_name: "ro.surface_flinger.use_content_detection_for_refresh_rate" } # useSmart90ForVideo indicates whether Scheduler should detect content FPS, and try to adjust the # screen refresh rate based on that. # Replaced by useContentDetectionForRefreshRate prop { api_name: "use_smart_90_for_video" type: Boolean scope: Public access: Readonly prop_name: "ro.surface_flinger.use_smart_90_for_video" deprecated: true } prop { Loading
services/surfaceflinger/sysprop/api/SurfaceFlingerProperties-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,10 @@ props { api_name: "use_color_management" prop_name: "ro.surface_flinger.use_color_management" } prop { api_name: "use_content_detection_for_refresh_rate" prop_name: "ro.surface_flinger.use_content_detection_for_refresh_rate" } prop { api_name: "use_context_priority" prop_name: "ro.surface_flinger.use_context_priority" Loading @@ -119,6 +123,7 @@ props { prop { api_name: "use_smart_90_for_video" prop_name: "ro.surface_flinger.use_smart_90_for_video" deprecated: true } prop { api_name: "use_vr_flinger" Loading