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

Unified Diff: content/browser/gpu/compositor_util.cc

Issue 22198004: Always enable FCM on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove XP logic from ShouldRunCompositingFieldTrial() Created 7 years, 4 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/browser/gpu/chrome_gpu_util.cc ('k') | content/browser/gpu/compositor_util_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/compositor_util.cc
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 96c626427f528d476805bf3c9090d7512ef8df5c..1c3ff04ac6887263b939c7ab6f70477c5dae5e1e 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,9 +45,6 @@ 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.
@@ -68,7 +61,7 @@ bool IsThreadedCompositingEnabled() {
if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
return true;
- if (IsForceCompositingModeBlacklisted())
+ if (!CanDoAcceleratedCompositing())
return false;
base::FieldTrial* trial =
@@ -78,14 +71,11 @@ bool IsThreadedCompositingEnabled() {
}
bool IsForceCompositingModeEnabled() {
-#if defined(OS_WIN)
+#if defined(OS_WIN) && defined(USE_AURA)
// We always want compositing on Aura Windows.
return true;
#endif
- if (!CanDoAcceleratedCompositing())
- return false;
-
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
// Command line switches take precedence over blacklisting and field trials.
@@ -100,9 +90,18 @@ bool IsForceCompositingModeEnabled() {
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%
wiltzius 2013/08/06 16:58:14 Be careful about the Mac code, since it's only ena
+ // since M28) as well and get rid of the field trial code.
+ return true;
+#else
base::FieldTrial* trial =
base::FieldTrialList::Find(kGpuCompositingFieldTrialName);
@@ -112,6 +111,7 @@ bool IsForceCompositingModeEnabled() {
(trial->group_name() ==
kGpuCompositingFieldTrialForceCompositingEnabledName ||
trial->group_name() == kGpuCompositingFieldTrialThreadEnabledName);
+#endif
}
} // namespace content
« no previous file with comments | « chrome/browser/gpu/chrome_gpu_util.cc ('k') | content/browser/gpu/compositor_util_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698