Index: content/browser/gpu/compositor_util.cc |
=================================================================== |
--- content/browser/gpu/compositor_util.cc (revision 176935) |
+++ content/browser/gpu/compositor_util.cc (working copy) |
@@ -36,6 +36,13 @@ |
return true; |
} |
+bool IsForceCompositingModeBlacklisted() { |
+ GpuFeatureType blacklisted_features = |
+ GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
+ return GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE == |
+ (blacklisted_features & GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE); |
+} |
+ |
} // namespace |
bool IsThreadedCompositingEnabled() { |
@@ -49,7 +56,7 @@ |
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- // Command line switches take precedence over field trials. |
+ // Command line switches take precedence over blacklist and field trials. |
if (command_line.HasSwitch(switches::kDisableForceCompositingMode) || |
command_line.HasSwitch(switches::kDisableThreadedCompositing)) |
return false; |
@@ -57,6 +64,9 @@ |
if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) |
return true; |
+ if (IsForceCompositingModeBlacklisted()) |
+ return false; |
+ |
base::FieldTrial* trial = |
base::FieldTrialList::Find(kGpuCompositingFieldTrialName); |
return trial && |
@@ -74,13 +84,16 @@ |
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- // Command line switches take precedence over field trials. |
+ // Command line switches take precedence over blacklisting and field trials. |
if (command_line.HasSwitch(switches::kDisableForceCompositingMode)) |
return false; |
if (command_line.HasSwitch(switches::kForceCompositingMode)) |
return true; |
+ if (IsForceCompositingModeBlacklisted()) |
+ return false; |
+ |
base::FieldTrial* trial = |
base::FieldTrialList::Find(kGpuCompositingFieldTrialName); |