| 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 =
|
|
|