summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 23:44:14 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 23:44:14 +0000
commit87522db92f7b68ef4ce27c01e22fa0e0d9487e0c (patch)
treec17b554304a7bb100b9f1a78a7f523102f72e933 /content/browser
parente0a17af1b2b2b0d7eb5f4ffd9b3aeea9ec94e501 (diff)
downloadchromium_src-87522db92f7b68ef4ce27c01e22fa0e0d9487e0c.zip
chromium_src-87522db92f7b68ef4ce27c01e22fa0e0d9487e0c.tar.gz
chromium_src-87522db92f7b68ef4ce27c01e22fa0e0d9487e0c.tar.bz2
Move gpu preliminary info collection from IO thread to FILE thread.
In linux we need certain file IO to collect preliminary gpu info. BUG=84497 TEST=bots green Review URL: http://codereview.chromium.org/7519007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/gpu/gpu_data_manager.cc8
-rw-r--r--content/browser/gpu/gpu_data_manager.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/content/browser/gpu/gpu_data_manager.cc b/content/browser/gpu/gpu_data_manager.cc
index dc70ade..079191a 100644
--- a/content/browser/gpu/gpu_data_manager.cc
+++ b/content/browser/gpu/gpu_data_manager.cc
@@ -44,7 +44,12 @@ void DisplayReconfigCallback(CGDirectDisplayID display,
GpuDataManager::GpuDataManager()
: complete_gpu_info_already_requested_(false) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ // Certain tests doesn't go through the browser startup path that
+ // initializes GpuDataManager on FILE thread; therefore, it is initialized
+ // on UI thread later, and we skip the preliminary gpu info collection
+ // in such situation.
+ if (!BrowserThread::CurrentlyOn(BrowserThread::FILE))
+ return;
GPUInfo gpu_info;
gpu_info_collector::CollectPreliminaryGraphicsInfo(&gpu_info);
@@ -61,6 +66,7 @@ GpuDataManager::~GpuDataManager() {
#endif
}
+// static
GpuDataManager* GpuDataManager::GetInstance() {
return Singleton<GpuDataManager>::get();
}
diff --git a/content/browser/gpu/gpu_data_manager.h b/content/browser/gpu/gpu_data_manager.h
index bc373ed..19a5682 100644
--- a/content/browser/gpu/gpu_data_manager.h
+++ b/content/browser/gpu/gpu_data_manager.h
@@ -99,7 +99,6 @@ class GpuDataManager {
bool complete_gpu_info_already_requested_;
- bool gpu_feature_flags_set_;
GpuFeatureFlags gpu_feature_flags_;
GpuFeatureFlags preliminary_gpu_feature_flags_;