summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-09 22:18:07 +0000
committerzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-09 22:18:07 +0000
commitf38c4e123d25ab3e7a18c0700857da4346794eef (patch)
treef511d7799f36114b3e378152958a95b044818208
parent263f607ce722e8e663d4ce7a0a25df09bb059d60 (diff)
downloadchromium_src-f38c4e123d25ab3e7a18c0700857da4346794eef.zip
chromium_src-f38c4e123d25ab3e7a18c0700857da4346794eef.tar.gz
chromium_src-f38c4e123d25ab3e7a18c0700857da4346794eef.tar.bz2
Code cleanup in GpuDataManagerImpl
BUG= TEST=compile fine Review URL: https://codereview.chromium.org/11090034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160951 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.cc20
-rw-r--r--content/browser/gpu/gpu_data_manager_impl.h4
2 files changed, 12 insertions, 12 deletions
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 5e2abb9..42a3bc3 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -87,8 +87,8 @@ GpuDataManagerImpl* GpuDataManagerImpl::GetInstance() {
GpuDataManagerImpl::GpuDataManagerImpl()
: complete_gpu_info_already_requested_(false),
- gpu_feature_type_(content::GPU_FEATURE_TYPE_UNKNOWN),
- preliminary_gpu_feature_type_(content::GPU_FEATURE_TYPE_UNKNOWN),
+ blacklisted_features_(content::GPU_FEATURE_TYPE_UNKNOWN),
+ preliminary_blacklisted_features_(content::GPU_FEATURE_TYPE_UNKNOWN),
gpu_switching_(content::GPU_SWITCHING_OPTION_AUTOMATIC),
observer_list_(new GpuDataManagerObserverList),
software_rendering_(false),
@@ -271,7 +271,7 @@ GpuFeatureType GpuDataManagerImpl::GetBlacklistedFeatures() const {
return flags;
}
- return gpu_feature_type_;
+ return blacklisted_features_;
}
GpuSwitchingOption GpuDataManagerImpl::GetGpuSwitchingOption() const {
@@ -298,11 +298,11 @@ bool GpuDataManagerImpl::GpuAccessAllowed() const {
// We only need to block GPU process if more features are disallowed other
// than those in the preliminary gpu feature flags because the latter work
// through renderer commandline switches.
- uint32 mask = ~(preliminary_gpu_feature_type_);
- if ((gpu_feature_type_ & mask) != 0)
+ uint32 mask = ~(preliminary_blacklisted_features_);
+ if ((blacklisted_features_ & mask) != 0)
return false;
- if (gpu_feature_type_ == content::GPU_FEATURE_TYPE_ALL) {
+ if (blacklisted_features_ == content::GPU_FEATURE_TYPE_ALL) {
if (gpu_blacklist_.get() && !gpu_blacklist_->needs_more_info())
return false;
}
@@ -492,7 +492,7 @@ void GpuDataManagerImpl::AppendPluginCommandLine(
}
void GpuDataManagerImpl::UpdatePreliminaryBlacklistedFeatures() {
- preliminary_gpu_feature_type_ = gpu_feature_type_;
+ preliminary_blacklisted_features_ = blacklisted_features_;
}
void GpuDataManagerImpl::NotifyGpuInfoUpdate() {
@@ -529,7 +529,7 @@ void GpuDataManagerImpl::UpdateBlacklistedFeatures(
if (Stage3DBlacklisted()) {
flags |= content::GPU_FEATURE_TYPE_FLASH_STAGE3D;
}
- gpu_feature_type_ = static_cast<GpuFeatureType>(flags);
+ blacklisted_features_ = static_cast<GpuFeatureType>(flags);
EnableSoftwareRenderingIfNecessary();
}
@@ -557,7 +557,7 @@ void GpuDataManagerImpl::RegisterSwiftShaderPath(const FilePath& path) {
void GpuDataManagerImpl::EnableSoftwareRenderingIfNecessary() {
if (!GpuAccessAllowed() ||
- (gpu_feature_type_ & content::GPU_FEATURE_TYPE_WEBGL)) {
+ (blacklisted_features_ & content::GPU_FEATURE_TYPE_WEBGL)) {
if (!swiftshader_path_.empty() &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableSoftwareRasterizer))
@@ -572,7 +572,7 @@ bool GpuDataManagerImpl::ShouldUseSoftwareRendering() const {
void GpuDataManagerImpl::BlacklistCard() {
card_blacklisted_ = true;
- gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL;
+ blacklisted_features_ = content::GPU_FEATURE_TYPE_ALL;
EnableSoftwareRenderingIfNecessary();
NotifyGpuInfoUpdate();
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index a73b2b3..c5de155 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -133,8 +133,8 @@ class CONTENT_EXPORT GpuDataManagerImpl
bool complete_gpu_info_already_requested_;
- content::GpuFeatureType gpu_feature_type_;
- content::GpuFeatureType preliminary_gpu_feature_type_;
+ content::GpuFeatureType blacklisted_features_;
+ content::GpuFeatureType preliminary_blacklisted_features_;
content::GpuSwitchingOption gpu_switching_;