OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 29 matching lines...) Expand all Loading... | |
40 static GpuDataManager* GetInstance(); | 40 static GpuDataManager* GetInstance(); |
41 | 41 |
42 // Requests complete GPUinfo if it has not already been requested | 42 // Requests complete GPUinfo if it has not already been requested |
43 void RequestCompleteGpuInfoIfNeeded(); | 43 void RequestCompleteGpuInfoIfNeeded(); |
44 | 44 |
45 // Only update if the current GPUInfo is not finalized. | 45 // Only update if the current GPUInfo is not finalized. |
46 void UpdateGpuInfo(const content::GPUInfo& gpu_info); | 46 void UpdateGpuInfo(const content::GPUInfo& gpu_info); |
47 | 47 |
48 const content::GPUInfo& gpu_info() const; | 48 const content::GPUInfo& gpu_info() const; |
49 | 49 |
50 bool complete_gpu_info_available() const { | |
51 return complete_gpu_info_available_; | |
52 } | |
53 | |
50 // Returns status of various GPU features. This is two parted: | 54 // Returns status of various GPU features. This is two parted: |
51 // { | 55 // { |
52 // featureStatus: [] | 56 // featureStatus: [] |
53 // problems: [] | 57 // problems: [] |
54 // } | 58 // } |
55 // | 59 // |
56 // Each entry in feature_status has: | 60 // Each entry in feature_status has: |
57 // { | 61 // { |
58 // name: "name of feature" | 62 // name: "name of feature" |
59 // status: "enabled" | "unavailable_software" | "unavailable_off" | | 63 // status: "enabled" | "unavailable_software" | "unavailable_off" | |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
215 static bool Merge(content::GPUInfo* object, const content::GPUInfo& other); | 219 static bool Merge(content::GPUInfo* object, const content::GPUInfo& other); |
216 | 220 |
217 // Determin if accelerated-2d-canvas is supported, which depends on whether | 221 // Determin if accelerated-2d-canvas is supported, which depends on whether |
218 // lose_context could happen and whether skia is the backend. | 222 // lose_context could happen and whether skia is the backend. |
219 bool supportsAccelerated2dCanvas() const; | 223 bool supportsAccelerated2dCanvas() const; |
220 | 224 |
221 // Try to switch to software rendering, if possible and necessary. | 225 // Try to switch to software rendering, if possible and necessary. |
222 void EnableSoftwareRenderingIfNecessary(); | 226 void EnableSoftwareRenderingIfNecessary(); |
223 | 227 |
224 bool complete_gpu_info_already_requested_; | 228 bool complete_gpu_info_already_requested_; |
229 bool complete_gpu_info_available_; | |
Ken Russell (switch to Gerrit)
2011/12/03 02:59:42
I don't fully understand the threading model in th
| |
225 | 230 |
226 GpuFeatureFlags gpu_feature_flags_; | 231 GpuFeatureFlags gpu_feature_flags_; |
227 GpuFeatureFlags preliminary_gpu_feature_flags_; | 232 GpuFeatureFlags preliminary_gpu_feature_flags_; |
228 | 233 |
229 UserFlags user_flags_; | 234 UserFlags user_flags_; |
230 | 235 |
231 content::GPUInfo gpu_info_; | 236 content::GPUInfo gpu_info_; |
232 mutable base::Lock gpu_info_lock_; | 237 mutable base::Lock gpu_info_lock_; |
233 | 238 |
234 scoped_ptr<GpuBlacklist> gpu_blacklist_; | 239 scoped_ptr<GpuBlacklist> gpu_blacklist_; |
235 | 240 |
236 // Observers. | 241 // Observers. |
237 const scoped_refptr<GpuDataManagerObserverList> observer_list_; | 242 const scoped_refptr<GpuDataManagerObserverList> observer_list_; |
238 | 243 |
239 ListValue log_messages_; | 244 ListValue log_messages_; |
240 bool software_rendering_; | 245 bool software_rendering_; |
241 | 246 |
242 FilePath swiftshader_path_; | 247 FilePath swiftshader_path_; |
243 | 248 |
244 DISALLOW_COPY_AND_ASSIGN(GpuDataManager); | 249 DISALLOW_COPY_AND_ASSIGN(GpuDataManager); |
245 }; | 250 }; |
246 | 251 |
247 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ | 252 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ |
OLD | NEW |