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

Unified Diff: content/common/compositor_util.cc

Issue 10914247: Enable by default threaded compositing on windows and FCM on mac (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: mac and linux get fcm with 30% probability Created 8 years, 3 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 | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/compositor_util.cc
diff --git a/content/common/compositor_util.cc b/content/common/compositor_util.cc
index dc16938c47e6534c4b96956d138a64fa63044ea1..3f36f113c1c98eb171e9f28182550878eb293347 100644
--- a/content/common/compositor_util.cc
+++ b/content/common/compositor_util.cc
@@ -18,8 +18,13 @@ bool IsThreadedCompositingEnabled() {
#endif
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kEnableThreadedCompositing) &&
- !command_line.HasSwitch(switches::kDisableThreadedCompositing))
+
+ // Command line switches take precedence over field trials.
+ if (command_line.HasSwitch(switches::kDisableForceCompositingMode) ||
+ command_line.HasSwitch(switches::kDisableThreadedCompositing))
+ return false;
+
+ if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
return true;
base::FieldTrial* trial =
@@ -36,8 +41,12 @@ bool IsForceCompositingModeEnabled() {
#endif
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kForceCompositingMode) &&
- !command_line.HasSwitch(switches::kDisableForceCompositingMode))
+
+ // Command line switches take precedence over field trials.
+ if (command_line.HasSwitch(switches::kDisableForceCompositingMode))
+ return false;
+
+ if (command_line.HasSwitch(switches::kForceCompositingMode))
return true;
base::FieldTrial* trial =
« no previous file with comments | « chrome/test/gpu/gpu_feature_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698