Loading services/surfaceflinger/Scheduler/Scheduler.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,12 @@ void Scheduler::startTimers() { using namespace sysprop; using namespace std::string_literals; if (const int64_t millis = set_touch_timer_ms(0); millis > 0) { const int32_t defaultTouchTouchTimerValue = FlagManager::getInstance().enable_fro_dependent_features() && sysprop::enable_frame_rate_override(true) ? 200 : 0; if (const int32_t millis = set_touch_timer_ms(defaultTouchTouchTimerValue); millis > 0) { // Touch events are coming to SF every 100ms, so the timer needs to be higher than that mTouchTimer.emplace( "TouchTimer", std::chrono::milliseconds(millis), Loading services/surfaceflinger/SurfaceFlinger.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -4088,7 +4088,10 @@ void SurfaceFlinger::initScheduler(const sp<const DisplayDevice>& display) { FeatureFlags features; if (sysprop::use_content_detection_for_refresh_rate(false)) { const auto defaultContentDetectionValue = FlagManager::getInstance().enable_fro_dependent_features() && sysprop::enable_frame_rate_override(true); if (sysprop::use_content_detection_for_refresh_rate(defaultContentDetectionValue)) { features |= Feature::kContentDetection; if (FlagManager::getInstance().enable_small_area_detection()) { features |= Feature::kSmallDirtyContentDetection; Loading services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ void FlagManager::dump(std::string& result) const { DUMP_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace); DUMP_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency); DUMP_READ_ONLY_FLAG(cache_if_source_crop_layer_only_moved); DUMP_READ_ONLY_FLAG(enable_fro_dependent_features); #undef DUMP_READ_ONLY_FLAG #undef DUMP_SERVER_FLAG Loading Loading @@ -195,6 +196,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace, "") FLAG_MANAGER_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency, "") FLAG_MANAGER_READ_ONLY_FLAG(cache_if_source_crop_layer_only_moved, "debug.sf.cache_source_crop_only_moved") FLAG_MANAGER_READ_ONLY_FLAG(enable_fro_dependent_features, "") /// Trunk stable server flags /// FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "") Loading services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ public: bool add_sf_skipped_frames_to_trace() const; bool use_known_refresh_rate_for_fps_consistency() const; bool cache_if_source_crop_layer_only_moved() const; bool enable_fro_dependent_features() const; protected: // overridden for unit tests Loading services/surfaceflinger/surfaceflinger_flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -98,5 +98,12 @@ flag { namespace: "core_graphics" description: "do not flatten layers if source crop is only moved" bug: "305718400" } flag { name: "enable_fro_dependent_features" namespace: "core_graphics" description: "enable frame rate override dependent features by default" bug: "314217419" is_fixed_read_only: true } Loading
services/surfaceflinger/Scheduler/Scheduler.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,12 @@ void Scheduler::startTimers() { using namespace sysprop; using namespace std::string_literals; if (const int64_t millis = set_touch_timer_ms(0); millis > 0) { const int32_t defaultTouchTouchTimerValue = FlagManager::getInstance().enable_fro_dependent_features() && sysprop::enable_frame_rate_override(true) ? 200 : 0; if (const int32_t millis = set_touch_timer_ms(defaultTouchTouchTimerValue); millis > 0) { // Touch events are coming to SF every 100ms, so the timer needs to be higher than that mTouchTimer.emplace( "TouchTimer", std::chrono::milliseconds(millis), Loading
services/surfaceflinger/SurfaceFlinger.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -4088,7 +4088,10 @@ void SurfaceFlinger::initScheduler(const sp<const DisplayDevice>& display) { FeatureFlags features; if (sysprop::use_content_detection_for_refresh_rate(false)) { const auto defaultContentDetectionValue = FlagManager::getInstance().enable_fro_dependent_features() && sysprop::enable_frame_rate_override(true); if (sysprop::use_content_detection_for_refresh_rate(defaultContentDetectionValue)) { features |= Feature::kContentDetection; if (FlagManager::getInstance().enable_small_area_detection()) { features |= Feature::kSmallDirtyContentDetection; Loading
services/surfaceflinger/common/FlagManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ void FlagManager::dump(std::string& result) const { DUMP_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace); DUMP_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency); DUMP_READ_ONLY_FLAG(cache_if_source_crop_layer_only_moved); DUMP_READ_ONLY_FLAG(enable_fro_dependent_features); #undef DUMP_READ_ONLY_FLAG #undef DUMP_SERVER_FLAG Loading Loading @@ -195,6 +196,7 @@ FLAG_MANAGER_READ_ONLY_FLAG(add_sf_skipped_frames_to_trace, "") FLAG_MANAGER_READ_ONLY_FLAG(use_known_refresh_rate_for_fps_consistency, "") FLAG_MANAGER_READ_ONLY_FLAG(cache_if_source_crop_layer_only_moved, "debug.sf.cache_source_crop_only_moved") FLAG_MANAGER_READ_ONLY_FLAG(enable_fro_dependent_features, "") /// Trunk stable server flags /// FLAG_MANAGER_SERVER_FLAG(late_boot_misc2, "") Loading
services/surfaceflinger/common/include/common/FlagManager.h +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ public: bool add_sf_skipped_frames_to_trace() const; bool use_known_refresh_rate_for_fps_consistency() const; bool cache_if_source_crop_layer_only_moved() const; bool enable_fro_dependent_features() const; protected: // overridden for unit tests Loading
services/surfaceflinger/surfaceflinger_flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -98,5 +98,12 @@ flag { namespace: "core_graphics" description: "do not flatten layers if source crop is only moved" bug: "305718400" } flag { name: "enable_fro_dependent_features" namespace: "core_graphics" description: "enable frame rate override dependent features by default" bug: "314217419" is_fixed_read_only: true }