OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 #include "base/process/process.h" | 12 #include "base/process/process.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 | 14 |
15 class GURL; | 15 class GURL; |
16 | 16 |
17 namespace base { | |
18 class FilePath; | |
19 } | |
20 | |
21 namespace gpu { | 17 namespace gpu { |
22 struct GPUInfo; | 18 struct GPUInfo; |
23 } | 19 } |
24 | 20 |
25 namespace content { | 21 namespace content { |
26 | 22 |
27 class GpuDataManagerObserver; | 23 class GpuDataManagerObserver; |
28 | 24 |
29 // This class is fully thread-safe. | 25 // This class is fully thread-safe. |
30 class GpuDataManager { | 26 class GpuDataManager { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // On other platforms, it's the same as IsEsentialGpuInfoAvailable(). | 64 // On other platforms, it's the same as IsEsentialGpuInfoAvailable(). |
69 virtual bool IsCompleteGpuInfoAvailable() const = 0; | 65 virtual bool IsCompleteGpuInfoAvailable() const = 0; |
70 | 66 |
71 // Requests that the GPU process report its current video memory usage stats, | 67 // Requests that the GPU process report its current video memory usage stats, |
72 // which can be retrieved via the GPU data manager's on-update function. | 68 // which can be retrieved via the GPU data manager's on-update function. |
73 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; | 69 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; |
74 | 70 |
75 // Returns true if SwiftShader should be used. | 71 // Returns true if SwiftShader should be used. |
76 virtual bool ShouldUseSwiftShader() const = 0; | 72 virtual bool ShouldUseSwiftShader() const = 0; |
77 | 73 |
78 // Register a path to SwiftShader. | |
79 virtual void RegisterSwiftShaderPath(const base::FilePath& path) = 0; | |
80 | |
81 // Registers/unregister |observer|. | 74 // Registers/unregister |observer|. |
82 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; | 75 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; |
83 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; | 76 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; |
84 | 77 |
85 // Allows a given domain previously blocked from accessing 3D APIs | 78 // Allows a given domain previously blocked from accessing 3D APIs |
86 // to access them again. | 79 // to access them again. |
87 virtual void UnblockDomainFrom3DAPIs(const GURL& url) = 0; | 80 virtual void UnblockDomainFrom3DAPIs(const GURL& url) = 0; |
88 | 81 |
89 // Set GL strings. This triggers a re-calculation of GPU blacklist | 82 // Set GL strings. This triggers a re-calculation of GPU blacklist |
90 // decision. | 83 // decision. |
(...skipping 20 matching lines...) Expand all Loading... |
111 // the backlists decision and applying commandline switches. | 104 // the backlists decision and applying commandline switches. |
112 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) = 0; | 105 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) = 0; |
113 | 106 |
114 protected: | 107 protected: |
115 virtual ~GpuDataManager() {} | 108 virtual ~GpuDataManager() {} |
116 }; | 109 }; |
117 | 110 |
118 }; // namespace content | 111 }; // namespace content |
119 | 112 |
120 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 113 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
OLD | NEW |