diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-27 00:19:37 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-27 00:19:37 +0000 |
commit | f3f79b10e5f2231e2133c00e2f901029234ff7c2 (patch) | |
tree | 7baf1575a544aede45c2d9b4ca4c49a77ecbb65c /chrome/common/gpu_info.h | |
parent | 09433b23b0126c80c78aad19eda8c59216026842 (diff) | |
download | chromium_src-f3f79b10e5f2231e2133c00e2f901029234ff7c2.zip chromium_src-f3f79b10e5f2231e2133c00e2f901029234ff7c2.tar.gz chromium_src-f3f79b10e5f2231e2133c00e2f901029234ff7c2.tar.bz2 |
Reland 72704 - Defered collect DirectX diagnostics until they are needed for about:gpu.
This is because collecting the stats often crashes.
Added a guard to prevent the collection of diagnostics on multiple threads simultaneously.
Renamed GPUInfo::Progress to GPUInfo::Level.
TEST=try, about:gpu does not cause concurrent diagnostics collection
BUG=none
Review URL: http://codereview.chromium.org/6364013
Review URL: http://codereview.chromium.org/6341011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gpu_info.h')
-rw-r--r-- | chrome/common/gpu_info.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/common/gpu_info.h b/chrome/common/gpu_info.h index 95c2237..3989c7a 100644 --- a/chrome/common/gpu_info.h +++ b/chrome/common/gpu_info.h @@ -22,15 +22,16 @@ class GPUInfo { GPUInfo(); ~GPUInfo() {} - enum Progress { + enum Level { kUninitialized, kPartial, + kCompleting, kComplete, }; // Returns whether this GPUInfo has been partially or fully initialized with // information. - Progress progress() const; + Level level() const; // The amount of time taken to get from the process starting to the message // loop being pumped. @@ -87,7 +88,7 @@ class GPUInfo { // semantics are available. bool can_lose_context() const; - void SetProgress(Progress progress); + void SetLevel(Level level); void SetInitializationTime(const base::TimeDelta& initialization_time); @@ -119,7 +120,7 @@ class GPUInfo { #endif private: - Progress progress_; + Level level_; base::TimeDelta initialization_time_; uint32 vendor_id_; uint32 device_id_; |