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 25 matching lines...) Expand all Loading... |
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( |
43 const std::string& gpu_blacklist_json, | 43 const std::string& gpu_blacklist_json, |
44 const gpu::GPUInfo& gpu_info); | 44 const gpu::GPUInfo& gpu_info); |
45 bool IsFeatureBlacklisted(int feature) const; | 45 bool IsFeatureBlacklisted(int feature) const; |
| 46 bool IsFeatureEnabled(int feature) const; |
46 bool IsDriverBugWorkaroundActive(int feature) const; | 47 bool IsDriverBugWorkaroundActive(int feature) const; |
47 gpu::GPUInfo GetGPUInfo() const; | 48 gpu::GPUInfo GetGPUInfo() const; |
48 void GetGpuProcessHandles( | 49 void GetGpuProcessHandles( |
49 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const; | 50 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const; |
50 bool GpuAccessAllowed(std::string* reason) const; | 51 bool GpuAccessAllowed(std::string* reason) const; |
51 void RequestCompleteGpuInfoIfNeeded(); | 52 void RequestCompleteGpuInfoIfNeeded(); |
52 bool IsEssentialGpuInfoAvailable() const; | 53 bool IsEssentialGpuInfoAvailable() const; |
53 bool IsCompleteGpuInfoAvailable() const; | 54 bool IsCompleteGpuInfoAvailable() const; |
54 void RequestVideoMemoryUsageStatsUpdate() const; | 55 void RequestVideoMemoryUsageStatsUpdate() const; |
55 bool ShouldUseSwiftShader() const; | 56 bool ShouldUseSwiftShader() const; |
56 void RegisterSwiftShaderPath(const base::FilePath& path); | 57 void RegisterSwiftShaderPath(const base::FilePath& path); |
57 void AddObserver(GpuDataManagerObserver* observer); | 58 void AddObserver(GpuDataManagerObserver* observer); |
58 void RemoveObserver(GpuDataManagerObserver* observer); | 59 void RemoveObserver(GpuDataManagerObserver* observer); |
59 void UnblockDomainFrom3DAPIs(const GURL& url); | 60 void UnblockDomainFrom3DAPIs(const GURL& url); |
60 void SetGLStrings(const std::string& gl_vendor, | 61 void SetGLStrings(const std::string& gl_vendor, |
61 const std::string& gl_renderer, | 62 const std::string& gl_renderer, |
62 const std::string& gl_version); | 63 const std::string& gl_version); |
63 void GetGLStrings(std::string* gl_vendor, | 64 void GetGLStrings(std::string* gl_vendor, |
64 std::string* gl_renderer, | 65 std::string* gl_renderer, |
65 std::string* gl_version); | 66 std::string* gl_version); |
66 void DisableHardwareAcceleration(); | 67 void DisableHardwareAcceleration(); |
67 void SetGpuInfo(const gpu::GPUInfo& gpu_info); | 68 void SetGpuInfo(const gpu::GPUInfo& gpu_info); |
68 | 69 |
69 void Initialize(); | 70 void Initialize(); |
70 | 71 |
71 void UpdateGpuInfo(const gpu::GPUInfo& gpu_info); | 72 void UpdateGpuInfo(const gpu::GPUInfo& gpu_info); |
| 73 void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info); |
72 | 74 |
73 void UpdateVideoMemoryUsageStats( | 75 void UpdateVideoMemoryUsageStats( |
74 const gpu::VideoMemoryUsageStats& video_memory_usage_stats); | 76 const gpu::VideoMemoryUsageStats& video_memory_usage_stats); |
75 | 77 |
76 void AppendRendererCommandLine(base::CommandLine* command_line) const; | 78 void AppendRendererCommandLine(base::CommandLine* command_line) const; |
77 | 79 |
78 void AppendGpuCommandLine(base::CommandLine* command_line, | 80 void AppendGpuCommandLine(base::CommandLine* command_line, |
79 gpu::GpuPreferences* gpu_preferences) const; | 81 gpu::GpuPreferences* gpu_preferences) const; |
80 | 82 |
81 void UpdateRendererWebPrefs(WebPreferences* prefs) const; | 83 void UpdateRendererWebPrefs(WebPreferences* prefs) const; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 GpuDataManagerImpl::DomainGuilt guilt, | 226 GpuDataManagerImpl::DomainGuilt guilt, |
225 base::Time at_time); | 227 base::Time at_time); |
226 GpuDataManagerImpl::DomainBlockStatus Are3DAPIsBlockedAtTime( | 228 GpuDataManagerImpl::DomainBlockStatus Are3DAPIsBlockedAtTime( |
227 const GURL& url, base::Time at_time) const; | 229 const GURL& url, base::Time at_time) const; |
228 int64_t GetBlockAllDomainsDurationInMs() const; | 230 int64_t GetBlockAllDomainsDurationInMs() const; |
229 | 231 |
230 bool complete_gpu_info_already_requested_; | 232 bool complete_gpu_info_already_requested_; |
231 | 233 |
232 std::set<int> blacklisted_features_; | 234 std::set<int> blacklisted_features_; |
233 std::set<int> preliminary_blacklisted_features_; | 235 std::set<int> preliminary_blacklisted_features_; |
| 236 // Eventually |blacklisted_features_| should be folded in to this. |
| 237 gpu::GpuFeatureInfo gpu_feature_info_; |
234 | 238 |
235 std::set<int> gpu_driver_bugs_; | 239 std::set<int> gpu_driver_bugs_; |
236 | 240 |
237 gpu::GPUInfo gpu_info_; | 241 gpu::GPUInfo gpu_info_; |
238 | 242 |
239 std::unique_ptr<gpu::GpuBlacklist> gpu_blacklist_; | 243 std::unique_ptr<gpu::GpuBlacklist> gpu_blacklist_; |
240 std::unique_ptr<gpu::GpuDriverBugList> gpu_driver_bug_list_; | 244 std::unique_ptr<gpu::GpuDriverBugList> gpu_driver_bug_list_; |
241 | 245 |
242 const scoped_refptr<GpuDataManagerObserverList> observer_list_; | 246 const scoped_refptr<GpuDataManagerObserverList> observer_list_; |
243 | 247 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // If one tries to call a member before initialization then it is defered | 281 // If one tries to call a member before initialization then it is defered |
278 // until Initialize() is completed. | 282 // until Initialize() is completed. |
279 std::vector<base::Closure> post_init_tasks_; | 283 std::vector<base::Closure> post_init_tasks_; |
280 | 284 |
281 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate); | 285 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate); |
282 }; | 286 }; |
283 | 287 |
284 } // namespace content | 288 } // namespace content |
285 | 289 |
286 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ | 290 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
OLD | NEW |