| 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 RequestVidmemUsageStatsUpdate() 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 UpdateVidmemUsageStats( |
| 48 const content::GPUVidmemUsageStats& vidmem_usage_stats); |
| 49 |
| 46 void AddLogMessage(Value* msg); | 50 void AddLogMessage(Value* msg); |
| 47 | 51 |
| 48 // Insert disable-feature switches corresponding to preliminary gpu feature | 52 // Insert disable-feature switches corresponding to preliminary gpu feature |
| 49 // flags into the renderer process command line. | 53 // flags into the renderer process command line. |
| 50 void AppendRendererCommandLine(CommandLine* command_line); | 54 void AppendRendererCommandLine(CommandLine* command_line); |
| 51 | 55 |
| 52 // Insert switches into gpu process command line: kUseGL, | 56 // Insert switches into gpu process command line: kUseGL, |
| 53 // kDisableGLMultisampling. | 57 // kDisableGLMultisampling. |
| 54 void AppendGpuCommandLine(CommandLine* command_line); | 58 void AppendGpuCommandLine(CommandLine* command_line); |
| 55 | 59 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 FilePath swiftshader_path_; | 116 FilePath swiftshader_path_; |
| 113 | 117 |
| 114 // Current card force-blacklisted due to GPU crashes, or disabled through | 118 // Current card force-blacklisted due to GPU crashes, or disabled through |
| 115 // the --disable-gpu commandline switch. | 119 // the --disable-gpu commandline switch. |
| 116 bool card_blacklisted_; | 120 bool card_blacklisted_; |
| 117 | 121 |
| 118 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); | 122 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); |
| 119 }; | 123 }; |
| 120 | 124 |
| 121 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 125 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
| OLD | NEW |