| 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_;
|
| }
|
|
|
|
|