summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gpu_feature_checker.cc
diff options
context:
space:
mode:
authorzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 21:48:39 +0000
committerzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 21:48:39 +0000
commit4ca1863011bba283f62afb0317999d5d0fa964a2 (patch)
treeac6fc93686aab439b018e1f44cb525dea8bb3290 /chrome/browser/gpu_feature_checker.cc
parent46a4f8291bad5be7e69b3132e550c89d88e6fa8e (diff)
downloadchromium_src-4ca1863011bba283f62afb0317999d5d0fa964a2.zip
chromium_src-4ca1863011bba283f62afb0317999d5d0fa964a2.tar.gz
chromium_src-4ca1863011bba283f62afb0317999d5d0fa964a2.tar.bz2
Make GpuDataManager thread safe.
Instead of forcing it on UI thread only, this CL makes it thread safe. We already put a locker around gpu_info, this CL puts another locker around log_messages, and the updater_list is thread safe. Therefore, the whole class now is thread safe. Also, I did a little bit clean up, 1) remove two dead function declarations; 2) rename Features to BlacklistedFeatures, because the old naming is confusing and multiple people complained to me already. 3) Expose AddLogMessage() so it can also be called on browser thread, which is the original motivation for me to do this refactoring. I am working on a unit test for GpuDataManager, but will upload it as a separate CL. This CL does not change behavior at all. BUG= TEST=tree Review URL: https://chromiumcodereview.appspot.com/10891013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gpu_feature_checker.cc')
-rw-r--r--chrome/browser/gpu_feature_checker.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/gpu_feature_checker.cc b/chrome/browser/gpu_feature_checker.cc
index ac9ec9e..4f39e37 100644
--- a/chrome/browser/gpu_feature_checker.cc
+++ b/chrome/browser/gpu_feature_checker.cc
@@ -18,7 +18,7 @@ bool IsFeatureAllowed(content::GpuDataManager* manager,
if (!manager->GpuAccessAllowed()) {
feature_allowed = false;
} else {
- uint32 blacklist_type = manager->GetGpuFeatureType();
+ uint32 blacklist_type = manager->GetBlacklistedFeatures();
if (blacklist_type & feature)
feature_allowed = false;
}
@@ -48,7 +48,7 @@ void GPUFeatureChecker::CheckGPUFeatureAvailability() {
#endif
content::GpuDataManager* manager = content::GpuDataManager::GetInstance();
- if (manager->IsCompleteGPUInfoAvailable())
+ if (manager->IsCompleteGpuInfoAvailable())
finalized = true;
bool feature_allowed = IsFeatureAllowed(manager, feature_);