Index: content/browser/gpu/compositor_util.cc |
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc |
index a0cf1e21a2b39a6ebf6e26fea590aeef1299d0f6..8d5839a8eb176f537f477ba302236878605f9083 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( |
gab
2013/08/15 20:07:49
This is already checked by CanDoAcceleratedComposi
|
- gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE); |
-} |
- |
} // namespace |
bool IsThreadedCompositingEnabled() { |
@@ -49,15 +45,15 @@ 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. |
gab
2013/08/15 20:07:49
Group command-line switches check together and mov
|
if (command_line.HasSwitch(switches::kDisableForceCompositingMode) || |
- command_line.HasSwitch(switches::kDisableThreadedCompositing)) |
+ command_line.HasSwitch(switches::kDisableThreadedCompositing)) { |
return false; |
+ } else if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) { |
+ return true; |
+ } |
#if defined(OS_CHROMEOS) |
// We always want threaded compositing on ChromeOS unless it's explicitly |
@@ -65,10 +61,7 @@ bool IsThreadedCompositingEnabled() { |
return true; |
#endif |
- if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) |
- return true; |
- |
- if (IsForceCompositingModeBlacklisted()) |
+ if (!CanDoAcceleratedCompositing()) |
return false; |
base::FieldTrial* trial = |
@@ -83,26 +76,31 @@ 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; |
+ else if (command_line.HasSwitch(switches::kForceCompositingMode)) |
+ return true; |
#if defined(OS_CHROMEOS) |
// We always want compositing ChromeOS unless it's explicitly disabled above. |
return true; |
#endif |
Zhenyao Mo
2013/08/15 20:23:37
This should be below the CanDOAcceleratedCompositi
gab
2013/08/15 21:03:19
Done.
|
- if (command_line.HasSwitch(switches::kForceCompositingMode)) |
- return true; |
- |
- if (IsForceCompositingModeBlacklisted()) |
+ if (!CanDoAcceleratedCompositing()) |
return false; |
+#if defined(OS_WIN) |
+ // Windows Vista+ has been shipping with FCM enabled at 100% since M24; skip |
+ // the field trial check to ensure this is always enabled on the try bots. |
+ // TODO(gab): Do the same thing in IsThreadedCompositingEnabled() once this is |
+ // stable. |
+ // TODO(gab): Do the same thing for Mac OS (which has been enabled at 100% |
+ // since M28) as well and get rid of the field trial code. |
+ return true; |
+#else |
Zhenyao Mo
2013/08/15 20:23:37
According to code style, this #else is unnecessary
gab
2013/08/15 21:03:19
Done.
|
base::FieldTrial* trial = |
base::FieldTrialList::Find(kGpuCompositingFieldTrialName); |
@@ -112,6 +110,7 @@ bool IsForceCompositingModeEnabled() { |
(trial->group_name() == |
kGpuCompositingFieldTrialForceCompositingEnabledName || |
trial->group_name() == kGpuCompositingFieldTrialThreadEnabledName); |
+#endif |
} |
} // namespace content |