OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_IMPL_PRIVATE_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 struct GpuPreferences; | 32 struct GpuPreferences; |
33 struct VideoMemoryUsageStats; | 33 struct VideoMemoryUsageStats; |
34 } | 34 } |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
38 class CONTENT_EXPORT GpuDataManagerImplPrivate { | 38 class CONTENT_EXPORT GpuDataManagerImplPrivate { |
39 public: | 39 public: |
40 static GpuDataManagerImplPrivate* Create(GpuDataManagerImpl* owner); | 40 static GpuDataManagerImplPrivate* Create(GpuDataManagerImpl* owner); |
41 | 41 |
42 void InitializeForTesting( | 42 void InitializeForTesting(const gpu::GpuControlListData& gpu_blacklist_data, |
43 const std::string& gpu_blacklist_json, | 43 const gpu::GPUInfo& gpu_info); |
44 const gpu::GPUInfo& gpu_info); | |
45 bool IsFeatureBlacklisted(int feature) const; | 44 bool IsFeatureBlacklisted(int feature) const; |
46 bool IsFeatureEnabled(int feature) const; | 45 bool IsFeatureEnabled(int feature) const; |
47 bool IsWebGLEnabled() const; | 46 bool IsWebGLEnabled() const; |
48 bool IsDriverBugWorkaroundActive(int feature) const; | 47 bool IsDriverBugWorkaroundActive(int feature) const; |
49 gpu::GPUInfo GetGPUInfo() const; | 48 gpu::GPUInfo GetGPUInfo() const; |
50 void GetGpuProcessHandles( | 49 void GetGpuProcessHandles( |
51 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const; | 50 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const; |
52 bool GpuAccessAllowed(std::string* reason) const; | 51 bool GpuAccessAllowed(std::string* reason) const; |
53 void RequestCompleteGpuInfoIfNeeded(); | 52 void RequestCompleteGpuInfoIfNeeded(); |
54 bool IsEssentialGpuInfoAvailable() const; | 53 bool IsEssentialGpuInfoAvailable() const; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 LogMessage(int _level, | 185 LogMessage(int _level, |
187 const std::string& _header, | 186 const std::string& _header, |
188 const std::string& _message) | 187 const std::string& _message) |
189 : level(_level), | 188 : level(_level), |
190 header(_header), | 189 header(_header), |
191 message(_message) { } | 190 message(_message) { } |
192 }; | 191 }; |
193 | 192 |
194 explicit GpuDataManagerImplPrivate(GpuDataManagerImpl* owner); | 193 explicit GpuDataManagerImplPrivate(GpuDataManagerImpl* owner); |
195 | 194 |
196 void InitializeImpl(const std::string& gpu_blacklist_json, | 195 void InitializeImpl(const gpu::GpuControlListData& gpu_blacklist_data, |
197 const std::string& gpu_driver_bug_list_json, | 196 const gpu::GpuControlListData& gpu_driver_bug_list_data, |
198 const gpu::GPUInfo& gpu_info); | 197 const gpu::GPUInfo& gpu_info); |
199 | 198 |
200 void RunPostInitTasks(); | 199 void RunPostInitTasks(); |
201 | 200 |
202 void UpdateGpuInfoHelper(); | 201 void UpdateGpuInfoHelper(); |
203 | 202 |
204 void UpdateBlacklistedFeatures(const std::set<int>& features); | 203 void UpdateBlacklistedFeatures(const std::set<int>& features); |
205 | 204 |
206 // This should only be called once at initialization time, when preliminary | 205 // This should only be called once at initialization time, when preliminary |
207 // gpu info is collected. | 206 // gpu info is collected. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // If one tries to call a member before initialization then it is defered | 280 // If one tries to call a member before initialization then it is defered |
282 // until Initialize() is completed. | 281 // until Initialize() is completed. |
283 std::vector<base::Closure> post_init_tasks_; | 282 std::vector<base::Closure> post_init_tasks_; |
284 | 283 |
285 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate); | 284 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate); |
286 }; | 285 }; |
287 | 286 |
288 } // namespace content | 287 } // namespace content |
289 | 288 |
290 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ | 289 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
OLD | NEW |