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 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // This indicator might change because we could collect more GPU info or | 50 // This indicator might change because we could collect more GPU info or |
51 // because the GPU blacklist could be updated. | 51 // because the GPU blacklist could be updated. |
52 // If this returns false, any further GPU access, including launching GPU | 52 // If this returns false, any further GPU access, including launching GPU |
53 // process, establish GPU channel, and GPU info collection, should be | 53 // process, establish GPU channel, and GPU info collection, should be |
54 // blocked. | 54 // blocked. |
55 // Can be called on any thread. | 55 // Can be called on any thread. |
56 // If |reason| is not NULL and GPU access is blocked, upon return, |reason| | 56 // If |reason| is not NULL and GPU access is blocked, upon return, |reason| |
57 // contains a description of the reason why GPU access is blocked. | 57 // contains a description of the reason why GPU access is blocked. |
58 virtual bool GpuAccessAllowed(std::string* reason) const = 0; | 58 virtual bool GpuAccessAllowed(std::string* reason) const = 0; |
59 | 59 |
60 // Requests complete GPUinfo if it has not already been requested | 60 // Requests complete GPU info if it has not already been requested |
61 virtual void RequestCompleteGpuInfoIfNeeded() = 0; | 61 virtual void RequestCompleteGpuInfoIfNeeded() = 0; |
62 | 62 |
| 63 // Check if basic and context GPU info have been collected. |
| 64 virtual bool IsEssentialGpuInfoAvailable() const = 0; |
| 65 |
| 66 // On Windows, besides basic and context GPU info, it also checks if |
| 67 // DxDiagnostics have been collected. |
| 68 // On other platforms, it's the same as IsEsentialGpuInfoAvailable(). |
63 virtual bool IsCompleteGpuInfoAvailable() const = 0; | 69 virtual bool IsCompleteGpuInfoAvailable() const = 0; |
64 | 70 |
65 // Requests that the GPU process report its current video memory usage stats, | 71 // Requests that the GPU process report its current video memory usage stats, |
66 // which can be retrieved via the GPU data manager's on-update function. | 72 // which can be retrieved via the GPU data manager's on-update function. |
67 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; | 73 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; |
68 | 74 |
69 // Returns true if SwiftShader should be used. | 75 // Returns true if SwiftShader should be used. |
70 virtual bool ShouldUseSwiftShader() const = 0; | 76 virtual bool ShouldUseSwiftShader() const = 0; |
71 | 77 |
72 // Register a path to SwiftShader. | 78 // Register a path to SwiftShader. |
(...skipping 27 matching lines...) Expand all Loading... |
100 // Whether the browser compositor can be used. | 106 // Whether the browser compositor can be used. |
101 virtual bool CanUseGpuBrowserCompositor() const = 0; | 107 virtual bool CanUseGpuBrowserCompositor() const = 0; |
102 | 108 |
103 protected: | 109 protected: |
104 virtual ~GpuDataManager() {} | 110 virtual ~GpuDataManager() {} |
105 }; | 111 }; |
106 | 112 |
107 }; // namespace content | 113 }; // namespace content |
108 | 114 |
109 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 115 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
OLD | NEW |