| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // On other platforms, it's the same as IsEsentialGpuInfoAvailable(). | 65 // On other platforms, it's the same as IsEsentialGpuInfoAvailable(). |
| 70 virtual bool IsCompleteGpuInfoAvailable() const = 0; | 66 virtual bool IsCompleteGpuInfoAvailable() const = 0; |
| 71 | 67 |
| 72 // Requests that the GPU process report its current video memory usage stats, | 68 // Requests that the GPU process report its current video memory usage stats, |
| 73 // which can be retrieved via the GPU data manager's on-update function. | 69 // which can be retrieved via the GPU data manager's on-update function. |
| 74 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; | 70 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; |
| 75 | 71 |
| 76 // Returns true if SwiftShader should be used. | 72 // Returns true if SwiftShader should be used. |
| 77 virtual bool ShouldUseSwiftShader() const = 0; | 73 virtual bool ShouldUseSwiftShader() const = 0; |
| 78 | 74 |
| 79 // Register a path to SwiftShader. | |
| 80 virtual void RegisterSwiftShaderPath(const base::FilePath& path) = 0; | |
| 81 | |
| 82 // Registers/unregister |observer|. | 75 // Registers/unregister |observer|. |
| 83 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; | 76 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; |
| 84 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; | 77 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; |
| 85 | 78 |
| 86 // Allows a given domain previously blocked from accessing 3D APIs | 79 // Allows a given domain previously blocked from accessing 3D APIs |
| 87 // to access them again. | 80 // to access them again. |
| 88 virtual void UnblockDomainFrom3DAPIs(const GURL& url) = 0; | 81 virtual void UnblockDomainFrom3DAPIs(const GURL& url) = 0; |
| 89 | 82 |
| 90 // Set GL strings. This triggers a re-calculation of GPU blacklist | 83 // Set GL strings. This triggers a re-calculation of GPU blacklist |
| 91 // decision. | 84 // decision. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 115 // the backlists decision and applying commandline switches. | 108 // the backlists decision and applying commandline switches. |
| 116 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) = 0; | 109 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) = 0; |
| 117 | 110 |
| 118 protected: | 111 protected: |
| 119 virtual ~GpuDataManager() {} | 112 virtual ~GpuDataManager() {} |
| 120 }; | 113 }; |
| 121 | 114 |
| 122 }; // namespace content | 115 }; // namespace content |
| 123 | 116 |
| 124 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 117 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
| OLD | NEW |