Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: content/child/runtime_features.cc

Issue 2028563002: Add a feature flag for enabling rendering pipeline throttling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/public/common/content_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); 201 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton));
202 202
203 if (base::FeatureList::IsEnabled(features::kPointerEvents)) { 203 if (base::FeatureList::IsEnabled(features::kPointerEvents)) {
204 WebRuntimeFeatures::enableFeatureFromString( 204 WebRuntimeFeatures::enableFeatureFromString(
205 std::string("PointerEvent"), true); 205 std::string("PointerEvent"), true);
206 } 206 }
207 207
208 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) 208 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations))
209 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); 209 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false);
210 210
211 WebRuntimeFeatures::enableRenderingPipelineThrottling(
212 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling));
213
211 // Enable explicitly enabled features, and then disable explicitly disabled 214 // Enable explicitly enabled features, and then disable explicitly disabled
212 // ones. 215 // ones.
213 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 216 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
214 std::vector<std::string> enabled_features = base::SplitString( 217 std::vector<std::string> enabled_features = base::SplitString(
215 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 218 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
216 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 219 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
217 for (const std::string& feature : enabled_features) 220 for (const std::string& feature : enabled_features)
218 WebRuntimeFeatures::enableFeatureFromString(feature, true); 221 WebRuntimeFeatures::enableFeatureFromString(feature, true);
219 } 222 }
220 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 223 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
221 std::vector<std::string> disabled_features = base::SplitString( 224 std::vector<std::string> disabled_features = base::SplitString(
222 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 225 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
223 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 226 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
224 for (const std::string& feature : disabled_features) 227 for (const std::string& feature : disabled_features)
225 WebRuntimeFeatures::enableFeatureFromString(feature, false); 228 WebRuntimeFeatures::enableFeatureFromString(feature, false);
226 } 229 }
227 } 230 }
228 231
229 } // namespace content 232 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698