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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 virtual bool IsCompleteGpuInfoAvailable() const OVERRIDE; | 43 virtual bool IsCompleteGpuInfoAvailable() const OVERRIDE; |
44 virtual void RequestVideoMemoryUsageStatsUpdate() const OVERRIDE; | 44 virtual void RequestVideoMemoryUsageStatsUpdate() const OVERRIDE; |
45 virtual bool ShouldUseSoftwareRendering() const OVERRIDE; | 45 virtual bool ShouldUseSoftwareRendering() const OVERRIDE; |
46 virtual void RegisterSwiftShaderPath(const FilePath& path) OVERRIDE; | 46 virtual void RegisterSwiftShaderPath(const FilePath& path) OVERRIDE; |
47 virtual void AddLogMessage(int level, const std::string& header, | 47 virtual void AddLogMessage(int level, const std::string& header, |
48 const std::string& message) OVERRIDE; | 48 const std::string& message) OVERRIDE; |
49 virtual base::ListValue* GetLogMessages() const OVERRIDE; | 49 virtual base::ListValue* GetLogMessages() const OVERRIDE; |
50 virtual void AddObserver(content::GpuDataManagerObserver* observer) OVERRIDE; | 50 virtual void AddObserver(content::GpuDataManagerObserver* observer) OVERRIDE; |
51 virtual void RemoveObserver( | 51 virtual void RemoveObserver( |
52 content::GpuDataManagerObserver* observer) OVERRIDE; | 52 content::GpuDataManagerObserver* observer) OVERRIDE; |
| 53 virtual void SetWindowCount(uint32 count) OVERRIDE; |
| 54 virtual uint32 GetWindowCount() const OVERRIDE; |
53 | 55 |
54 // This collects preliminary GPU info, load GpuBlacklist, and compute the | 56 // This collects preliminary GPU info, load GpuBlacklist, and compute the |
55 // preliminary blacklisted features; it should only be called at browser | 57 // preliminary blacklisted features; it should only be called at browser |
56 // startup time in UI thread before the IO restriction is turned on. | 58 // startup time in UI thread before the IO restriction is turned on. |
57 void Initialize(); | 59 void Initialize(); |
58 | 60 |
59 // Only update if the current GPUInfo is not finalized. If blacklist is | 61 // Only update if the current GPUInfo is not finalized. If blacklist is |
60 // loaded, run through blacklist and update blacklisted features. | 62 // loaded, run through blacklist and update blacklisted features. |
61 void UpdateGpuInfo(const content::GPUInfo& gpu_info); | 63 void UpdateGpuInfo(const content::GPUInfo& gpu_info); |
62 | 64 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 FilePath swiftshader_path_; | 150 FilePath swiftshader_path_; |
149 | 151 |
150 // Current card force-blacklisted due to GPU crashes, or disabled through | 152 // Current card force-blacklisted due to GPU crashes, or disabled through |
151 // the --disable-gpu commandline switch. | 153 // the --disable-gpu commandline switch. |
152 bool card_blacklisted_; | 154 bool card_blacklisted_; |
153 | 155 |
154 // We disable histogram stuff in testing, especially in unit tests because | 156 // We disable histogram stuff in testing, especially in unit tests because |
155 // they cause random failures. | 157 // they cause random failures. |
156 bool update_histograms_; | 158 bool update_histograms_; |
157 | 159 |
| 160 // Number of currently open windows, to be used in gpu memory allocation. |
| 161 int window_count_; |
| 162 |
158 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); | 163 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); |
159 }; | 164 }; |
160 | 165 |
161 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 166 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
OLD | NEW |