OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <string> | 11 #include <string> |
9 | 12 |
10 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
11 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
12 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/singleton.h" | 18 #include "base/memory/singleton.h" |
15 #include "base/process/kill.h" | 19 #include "base/process/kill.h" |
16 #include "base/synchronization/lock.h" | 20 #include "base/synchronization/lock.h" |
17 #include "base/time/time.h" | 21 #include "base/time/time.h" |
18 #include "base/values.h" | 22 #include "base/values.h" |
19 #include "content/public/browser/gpu_data_manager.h" | 23 #include "content/public/browser/gpu_data_manager.h" |
20 #include "content/public/common/gpu_memory_stats.h" | 24 #include "content/public/common/gpu_memory_stats.h" |
21 #include "content/public/common/three_d_api_types.h" | 25 #include "content/public/common/three_d_api_types.h" |
22 #include "gpu/config/gpu_info.h" | 26 #include "gpu/config/gpu_info.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 ThreeDAPIType requester); | 171 ThreeDAPIType requester); |
168 | 172 |
169 // Get number of features being blacklisted. | 173 // Get number of features being blacklisted. |
170 size_t GetBlacklistedFeatureCount() const; | 174 size_t GetBlacklistedFeatureCount() const; |
171 | 175 |
172 void SetDisplayCount(unsigned int display_count); | 176 void SetDisplayCount(unsigned int display_count); |
173 unsigned int GetDisplayCount() const; | 177 unsigned int GetDisplayCount() const; |
174 | 178 |
175 // Set the active gpu. | 179 // Set the active gpu. |
176 // Return true if it's a different GPU from the previous active one. | 180 // Return true if it's a different GPU from the previous active one. |
177 bool UpdateActiveGpu(uint32 vendor_id, uint32 device_id); | 181 bool UpdateActiveGpu(uint32_t vendor_id, uint32_t device_id); |
178 | 182 |
179 // Called when GPU process initialization failed. | 183 // Called when GPU process initialization failed. |
180 void OnGpuProcessInitFailure(); | 184 void OnGpuProcessInitFailure(); |
181 | 185 |
182 bool IsDriverBugWorkaroundActive(int feature) const; | 186 bool IsDriverBugWorkaroundActive(int feature) const; |
183 | 187 |
184 private: | 188 private: |
185 friend class GpuDataManagerImplPrivate; | 189 friend class GpuDataManagerImplPrivate; |
186 friend class GpuDataManagerImplPrivateTest; | 190 friend class GpuDataManagerImplPrivateTest; |
187 friend struct base::DefaultSingletonTraits<GpuDataManagerImpl>; | 191 friend struct base::DefaultSingletonTraits<GpuDataManagerImpl>; |
(...skipping 27 matching lines...) Expand all Loading... |
215 | 219 |
216 mutable base::Lock lock_; | 220 mutable base::Lock lock_; |
217 scoped_ptr<GpuDataManagerImplPrivate> private_; | 221 scoped_ptr<GpuDataManagerImplPrivate> private_; |
218 | 222 |
219 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); | 223 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); |
220 }; | 224 }; |
221 | 225 |
222 } // namespace content | 226 } // namespace content |
223 | 227 |
224 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 228 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
OLD | NEW |