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

Unified Diff: content/common/compositor_util.cc

Issue 11091072: Fix failing browser tests when running with force-compositing-mode. It uses new trace events checke… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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..c7682e6d72a45c63fd9504684937ca7431062b25 100644
--- a/content/common/compositor_util.cc
+++ b/content/common/compositor_util.cc
@@ -18,8 +18,14 @@ 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::kDisableAcceleratedCompositing) ||
+ 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 +42,13 @@ 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::kDisableAcceleratedCompositing) ||
+ 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