Commit 7d9fc47c authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Performance optimization for IsFormControlsRefreshEnabled()

The CL [1] caused several perf regressions (see [2] for example).
Basically the only change in [1] was to convert this:
   RuntimeEnabledFeatures::FormControlsRefreshEnabled()
to this:
   features::IsFormControlsRefreshEnabled()

This CL attempts to reduce the overhead of checking the feature
flag.

[1] https://chromium.googlesource.com/chromium/src/+/6da8104d37c254c842a7fd6dfffb208bd303788d
[2] https://crbug.com/1039272

Bug: 1039272
Change-Id: I47213d88a64f33ad3eddc3fd2fefb921d377395e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1993672
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#730280}
parent 65e2a2e2
...@@ -151,7 +151,9 @@ const base::Feature kWebUIA11yEnhancements{"WebUIA11yEnhancements", ...@@ -151,7 +151,9 @@ const base::Feature kWebUIA11yEnhancements{"WebUIA11yEnhancements",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
bool IsFormControlsRefreshEnabled() { bool IsFormControlsRefreshEnabled() {
return base::FeatureList::IsEnabled(features::kFormControlsRefresh); static const bool form_controls_refresh_enabled =
base::FeatureList::IsEnabled(features::kFormControlsRefresh);
return form_controls_refresh_enabled;
} }
bool IsAutomaticUiAdjustmentsForTouchEnabled() { bool IsAutomaticUiAdjustmentsForTouchEnabled() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment