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

Unified Diff: content/child/runtime_features.cc

Issue 447863003: Using experiments to activate the DisplayList2DCanvas optimization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase master + Fixing AboutFlagsHistogramTest.CheckHistograms test Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/runtime_features.cc
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index 9386b8ea79d4f18c45e7a865b70b7c6abceac18f..324859915612b9e5764cd6c59226691b8dc2edac 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -5,6 +5,7 @@
#include "content/child/runtime_features.h"
#include "base/command_line.h"
+#include "base/metrics/field_trial.h"
#include "content/common/content_switches_internal.h"
#include "content/public/common/content_switches.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
@@ -145,8 +146,15 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures))
WebRuntimeFeatures::enableExperimentalCanvasFeatures(true);
- if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas))
+ if (command_line.HasSwitch(switches::kDisableDisplayList2dCanvas)) {
+ WebRuntimeFeatures::enableDisplayList2dCanvas(false);
+ } else if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) {
WebRuntimeFeatures::enableDisplayList2dCanvas(true);
+ } else {
+ WebRuntimeFeatures::enableDisplayList2dCanvas(
+ base::FieldTrialList::FindFullName("DisplayList2dCanvas") == "Enabled"
+ );
+ }
if (command_line.HasSwitch(switches::kEnableWebGLDraftExtensions))
WebRuntimeFeatures::enableWebGLDraftExtensions(true);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698