| Index: content/browser/gpu/compositor_util.cc
|
| diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
|
| index 9270300d2968439ed06686719c548c4cbe29232b..701d5012850cef74f9c11da874eba8f7a6ce3796 100644
|
| --- a/content/browser/gpu/compositor_util.cc
|
| +++ b/content/browser/gpu/compositor_util.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/command_line.h"
|
| #include "base/metrics/field_trial.h"
|
| +#include "build/build_config.h"
|
| #include "content/public/browser/gpu_data_manager.h"
|
| #include "content/public/common/content_constants.h"
|
| #include "content/public/common/content_switches.h"
|
| @@ -36,11 +37,6 @@ bool CanDoAcceleratedCompositing() {
|
| return true;
|
| }
|
|
|
| -bool IsForceCompositingModeBlacklisted() {
|
| - return GpuDataManager::GetInstance()->IsFeatureBlacklisted(
|
| - gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE);
|
| -}
|
| -
|
| } // namespace
|
|
|
| bool IsThreadedCompositingEnabled() {
|
| @@ -49,20 +45,17 @@ bool IsThreadedCompositingEnabled() {
|
| return true;
|
| #endif
|
|
|
| - if (!CanDoAcceleratedCompositing())
|
| - return false;
|
| -
|
| const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
|
|
| // Command line switches take precedence over blacklist and field trials.
|
| if (command_line.HasSwitch(switches::kDisableForceCompositingMode) ||
|
| - command_line.HasSwitch(switches::kDisableThreadedCompositing))
|
| + command_line.HasSwitch(switches::kDisableThreadedCompositing)) {
|
| return false;
|
| -
|
| - if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
|
| + } else if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) {
|
| return true;
|
| + }
|
|
|
| - if (IsForceCompositingModeBlacklisted())
|
| + if (!CanDoAcceleratedCompositing())
|
| return false;
|
|
|
| base::FieldTrial* trial =
|
| @@ -77,19 +70,15 @@ bool IsForceCompositingModeEnabled() {
|
| return true;
|
| #endif
|
|
|
| - if (!CanDoAcceleratedCompositing())
|
| - return false;
|
| -
|
| const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
|
|
| // Command line switches take precedence over blacklisting and field trials.
|
| if (command_line.HasSwitch(switches::kDisableForceCompositingMode))
|
| return false;
|
| -
|
| - if (command_line.HasSwitch(switches::kForceCompositingMode))
|
| + else if (command_line.HasSwitch(switches::kForceCompositingMode))
|
| return true;
|
|
|
| - if (IsForceCompositingModeBlacklisted())
|
| + if (!CanDoAcceleratedCompositing())
|
| return false;
|
|
|
| base::FieldTrial* trial =
|
|
|