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 "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "content/public/common/gpu_feature_type.h" | 9 #include "content/public/common/gpu_feature_type.h" |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // process, establish GPU channel, and GPU info collection, should be | 40 // process, establish GPU channel, and GPU info collection, should be |
41 // blocked. | 41 // blocked. |
42 // Can be called on any thread. | 42 // Can be called on any thread. |
43 virtual bool GpuAccessAllowed() = 0; | 43 virtual bool GpuAccessAllowed() = 0; |
44 | 44 |
45 // Requests complete GPUinfo if it has not already been requested | 45 // Requests complete GPUinfo if it has not already been requested |
46 virtual void RequestCompleteGpuInfoIfNeeded() = 0; | 46 virtual void RequestCompleteGpuInfoIfNeeded() = 0; |
47 | 47 |
48 virtual bool IsCompleteGPUInfoAvailable() const = 0; | 48 virtual bool IsCompleteGPUInfoAvailable() const = 0; |
49 | 49 |
| 50 // Requests that the GPU process report its current video memory usage stats, |
| 51 // which can be retrieved via the GPU data manager's on-update function. |
| 52 virtual void RequestVideoMemoryUsageStatsUpdate() = 0; |
| 53 |
50 // Returns true if the software rendering should currently be used. | 54 // Returns true if the software rendering should currently be used. |
51 virtual bool ShouldUseSoftwareRendering() = 0; | 55 virtual bool ShouldUseSoftwareRendering() = 0; |
52 | 56 |
53 // Register a path to the SwiftShader software renderer. | 57 // Register a path to the SwiftShader software renderer. |
54 virtual void RegisterSwiftShaderPath(const FilePath& path) = 0; | 58 virtual void RegisterSwiftShaderPath(const FilePath& path) = 0; |
55 | 59 |
56 virtual const base::ListValue& GetLogMessages() const = 0; | 60 virtual const base::ListValue& GetLogMessages() const = 0; |
57 | 61 |
58 // Registers/unregister |observer|. | 62 // Registers/unregister |observer|. |
59 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; | 63 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; |
60 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; | 64 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; |
61 | 65 |
62 protected: | 66 protected: |
63 virtual ~GpuDataManager() {} | 67 virtual ~GpuDataManager() {} |
64 }; | 68 }; |
65 | 69 |
66 }; // namespace content | 70 }; // namespace content |
67 | 71 |
68 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 72 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
OLD | NEW |