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

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

Issue 11930003: Add force_compositing_mode support in gpu blacklist. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/ui/webui/gpu_internals_ui.cc ('k') | content/browser/gpu/gpu_blacklist.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
===================================================================
--- 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);
« no previous file with comments | « chrome/browser/ui/webui/gpu_internals_ui.cc ('k') | content/browser/gpu/gpu_blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698