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

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

Issue 10907098: Revert 155218 - Move gpu blacklist to content side. (Closed) Base URL: svn://svn.chromium.org/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
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_data_manager_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl.cc
===================================================================
--- content/browser/gpu/gpu_data_manager_impl.cc (revision 155222)
+++ content/browser/gpu/gpu_data_manager_impl.cc (working copy)
@@ -13,7 +13,6 @@
#include "base/values.h"
#include "base/version.h"
#include "content/browser/gpu/gpu_process_host.h"
-#include "content/browser/gpu/gpu_util.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/gpu/gpu_info_collector.h"
#include "content/public/browser/browser_thread.h"
@@ -59,24 +58,14 @@
BlacklistCard();
}
-void GpuDataManagerImpl::Initialize(
- const std::string& browser_version_string,
- const std::string& gpu_blacklist_json) {
+void GpuDataManagerImpl::InitializeGpuInfo() {
content::GPUInfo gpu_info;
- gpu_info_collector::CollectPreliminaryGraphicsInfo(&gpu_info);
-
- if (!gpu_blacklist_json.empty()) {
- CHECK(!browser_version_string.empty());
- gpu_blacklist_.reset(new GpuBlacklist());
- bool succeed = gpu_blacklist_->LoadGpuBlacklist(
- browser_version_string,
- gpu_blacklist_json,
- GpuBlacklist::kCurrentOsOnly);
- CHECK(succeed);
- }
-
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSkipGpuDataLoading))
+ gpu_info_collector::CollectPreliminaryGraphicsInfo(&gpu_info);
+ else
+ gpu_info.finalized = true;
UpdateGpuInfo(gpu_info);
- UpdatePreliminaryBlacklistedFeatures();
}
GpuDataManagerImpl::~GpuDataManagerImpl() {
@@ -103,15 +92,6 @@
content::GetContentClient()->SetGpuInfo(gpu_info);
- if (gpu_blacklist_.get()) {
- GpuFeatureType feature_type = gpu_blacklist_->DetermineGpuFeatureType(
- GpuBlacklist::kOsAny,
- NULL,
- GpuDataManager::GetInstance()->GetGPUInfo());
- gpu_util::UpdateStats(gpu_blacklist_.get(), feature_type);
- UpdateBlacklistedFeatures(feature_type);
- }
-
{
base::AutoLock auto_lock(gpu_info_lock_);
gpu_info_ = gpu_info;
@@ -162,12 +142,6 @@
return value;
}
-std::string GpuDataManagerImpl::GetBlacklistVersion() const {
- if (gpu_blacklist_.get())
- return gpu_blacklist_->GetVersion();
- return "0";
-}
-
GpuFeatureType GpuDataManagerImpl::GetBlacklistedFeatures() const {
if (software_rendering_) {
GpuFeatureType flags;
@@ -181,13 +155,6 @@
return gpu_feature_type_;
}
-base::ListValue* GpuDataManagerImpl::GetBlacklistReasons() const {
- ListValue* reasons = new ListValue();
- if (gpu_blacklist_.get())
- gpu_blacklist_->GetBlacklistReasons(reasons);
- return reasons;
-}
-
bool GpuDataManagerImpl::GpuAccessAllowed() const {
if (software_rendering_)
return true;
@@ -341,7 +308,9 @@
#endif
}
-void GpuDataManagerImpl::UpdatePreliminaryBlacklistedFeatures() {
+void GpuDataManagerImpl::SetPreliminaryBlacklistedFeatures(
+ GpuFeatureType feature_type) {
+ UpdateBlacklistedFeatures(feature_type);
preliminary_gpu_feature_type_ = gpu_feature_type_;
}
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_data_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698