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

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

Issue 23775004: Revert 221114 "Enable GPU blacklist in tests." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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
Index: trunk/src/content/browser/gpu/compositor_util.cc
===================================================================
--- trunk/src/content/browser/gpu/compositor_util.cc (revision 221144)
+++ trunk/src/content/browser/gpu/compositor_util.cc (working copy)
@@ -6,7 +6,6 @@
#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"
@@ -37,6 +36,11 @@
return true;
}
+bool IsForceCompositingModeBlacklisted() {
+ return GpuDataManager::GetInstance()->IsFeatureBlacklisted(
+ gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE);
+}
+
} // namespace
bool IsThreadedCompositingEnabled() {
@@ -45,17 +49,20 @@
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;
- } else if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) {
+
+ if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
return true;
- }
- if (!CanDoAcceleratedCompositing())
+ if (IsForceCompositingModeBlacklisted())
return false;
base::FieldTrial* trial =
@@ -70,15 +77,19 @@
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))
+
+ if (command_line.HasSwitch(switches::kForceCompositingMode))
return true;
- if (!CanDoAcceleratedCompositing())
+ if (IsForceCompositingModeBlacklisted())
return false;
base::FieldTrial* trial =
« no previous file with comments | « trunk/src/chrome/test/gpu/gpu_feature_browsertest.cc ('k') | trunk/src/content/browser/gpu/compositor_util_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698