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

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

Issue 10915219: Add capability for GPU blacklist to manage GPU switching. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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: content/browser/gpu/gpu_data_manager_impl.cc
===================================================================
--- content/browser/gpu/gpu_data_manager_impl.cc (revision 156051)
+++ content/browser/gpu/gpu_data_manager_impl.cc (working copy)
@@ -32,6 +32,7 @@
using content::BrowserThread;
using content::GpuDataManagerObserver;
using content::GpuFeatureType;
+using content::GpuSwitchingOption;
// static
content::GpuDataManager* content::GpuDataManager::GetInstance() {
@@ -47,6 +48,7 @@
: complete_gpu_info_already_requested_(false),
gpu_feature_type_(content::GPU_FEATURE_TYPE_UNKNOWN),
preliminary_gpu_feature_type_(content::GPU_FEATURE_TYPE_UNKNOWN),
+ gpu_switching_(content::GPU_SWITCHING_AUTOMATIC),
observer_list_(new GpuDataManagerObserverList),
software_rendering_(false),
card_blacklisted_(false),
@@ -127,11 +129,15 @@
content::GetContentClient()->SetGpuInfo(gpu_info);
if (gpu_blacklist_.get()) {
- GpuFeatureType feature_type = gpu_blacklist_->DetermineGpuFeatureType(
- GpuBlacklist::kOsAny, NULL, gpu_info);
- if (update_histograms_)
- gpu_util::UpdateStats(gpu_blacklist_.get(), feature_type);
- UpdateBlacklistedFeatures(feature_type);
+ GpuBlacklist::Decision decision =
+ gpu_blacklist_->MakeBlacklistDecision(
+ GpuBlacklist::kOsAny, NULL, gpu_info);
+ if (update_histograms_) {
+ gpu_util::UpdateStats(gpu_blacklist_.get(),
+ decision.blacklisted_features);
+ }
+ UpdateBlacklistedFeatures(decision.blacklisted_features);
+ gpu_switching_ = decision.gpu_switching;
}
{
@@ -199,6 +205,10 @@
return gpu_feature_type_;
}
+GpuSwitchingOption GpuDataManagerImpl::GetGpuSwitchingOption() const {
+ return gpu_switching_;
+}
+
base::ListValue* GpuDataManagerImpl::GetBlacklistReasons() const {
ListValue* reasons = new ListValue();
if (gpu_blacklist_.get())

Powered by Google App Engine
This is Rietveld 408576698