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

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
Index: content/browser/gpu/compositor_util.cc
===================================================================
--- content/browser/gpu/compositor_util.cc (revision 176935)
+++ content/browser/gpu/compositor_util.cc (working copy)
@@ -54,6 +54,11 @@
command_line.HasSwitch(switches::kDisableThreadedCompositing))
return false;
+ GpuFeatureType blacklisted_features =
vangelis 2013/01/16 18:04:09 nit: Could you hoist that into a separate method i
Zhenyao Mo 2013/01/16 20:53:36 Done.
+ GpuDataManager::GetInstance()->GetBlacklistedFeatures();
+ if (blacklisted_features & GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE)
+ return false;
+
if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
return true;
@@ -74,13 +79,18 @@
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;
+ GpuFeatureType blacklisted_features =
+ GpuDataManager::GetInstance()->GetBlacklistedFeatures();
+ if (blacklisted_features & GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE)
+ return false;
+
base::FieldTrial* trial =
base::FieldTrialList::Find(kGpuCompositingFieldTrialName);

Powered by Google App Engine
This is Rietveld 408576698