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_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 // Getter for the singleton. This will return NULL on failure. | 26 // Getter for the singleton. This will return NULL on failure. |
27 static GpuDataManagerImpl* GetInstance(); | 27 static GpuDataManagerImpl* GetInstance(); |
28 | 28 |
29 // GpuDataManager implementation. | 29 // GpuDataManager implementation. |
30 virtual content::GpuFeatureType GetGpuFeatureType() OVERRIDE; | 30 virtual content::GpuFeatureType GetGpuFeatureType() OVERRIDE; |
31 virtual void SetGpuFeatureType(content::GpuFeatureType feature_type) OVERRIDE; | 31 virtual void SetGpuFeatureType(content::GpuFeatureType feature_type) OVERRIDE; |
32 virtual content::GPUInfo GetGPUInfo() const OVERRIDE; | 32 virtual content::GPUInfo GetGPUInfo() const OVERRIDE; |
33 virtual bool GpuAccessAllowed() OVERRIDE; | 33 virtual bool GpuAccessAllowed() OVERRIDE; |
34 virtual void RequestCompleteGpuInfoIfNeeded() OVERRIDE; | 34 virtual void RequestCompleteGpuInfoIfNeeded() OVERRIDE; |
35 virtual bool IsCompleteGPUInfoAvailable() const OVERRIDE; | 35 virtual bool IsCompleteGPUInfoAvailable() const OVERRIDE; |
| 36 virtual void RequestVidmemUpdate() OVERRIDE; |
36 virtual bool ShouldUseSoftwareRendering() OVERRIDE; | 37 virtual bool ShouldUseSoftwareRendering() OVERRIDE; |
37 virtual void RegisterSwiftShaderPath(const FilePath& path) OVERRIDE; | 38 virtual void RegisterSwiftShaderPath(const FilePath& path) OVERRIDE; |
38 virtual const base::ListValue& GetLogMessages() const OVERRIDE; | 39 virtual const base::ListValue& GetLogMessages() const OVERRIDE; |
39 virtual void AddObserver(content::GpuDataManagerObserver* observer) OVERRIDE; | 40 virtual void AddObserver(content::GpuDataManagerObserver* observer) OVERRIDE; |
40 virtual void RemoveObserver( | 41 virtual void RemoveObserver( |
41 content::GpuDataManagerObserver* observer) OVERRIDE; | 42 content::GpuDataManagerObserver* observer) OVERRIDE; |
42 | 43 |
43 // Only update if the current GPUInfo is not finalized. | 44 // Only update if the current GPUInfo is not finalized. |
44 void UpdateGpuInfo(const content::GPUInfo& gpu_info); | 45 void UpdateGpuInfo(const content::GPUInfo& gpu_info); |
45 | 46 |
| 47 void UpdateVidmem(const content::GPUVidmem& vidmem); |
| 48 |
46 void AddLogMessage(Value* msg); | 49 void AddLogMessage(Value* msg); |
47 | 50 |
48 // Insert disable-feature switches corresponding to preliminary gpu feature | 51 // Insert disable-feature switches corresponding to preliminary gpu feature |
49 // flags into the renderer process command line. | 52 // flags into the renderer process command line. |
50 void AppendRendererCommandLine(CommandLine* command_line); | 53 void AppendRendererCommandLine(CommandLine* command_line); |
51 | 54 |
52 // Insert switches into gpu process command line: kUseGL, | 55 // Insert switches into gpu process command line: kUseGL, |
53 // kDisableGLMultisampling. | 56 // kDisableGLMultisampling. |
54 void AppendGpuCommandLine(CommandLine* command_line); | 57 void AppendGpuCommandLine(CommandLine* command_line); |
55 | 58 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 FilePath swiftshader_path_; | 109 FilePath swiftshader_path_; |
107 | 110 |
108 // Current card force-blacklisted due to GPU crashes, or disabled through | 111 // Current card force-blacklisted due to GPU crashes, or disabled through |
109 // the --disable-gpu commandline switch. | 112 // the --disable-gpu commandline switch. |
110 bool card_blacklisted_; | 113 bool card_blacklisted_; |
111 | 114 |
112 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); | 115 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); |
113 }; | 116 }; |
114 | 117 |
115 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 118 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
OLD | NEW |