OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BLACKLIST_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 std::string value_; | 201 std::string value_; |
202 }; | 202 }; |
203 | 203 |
204 class GpuBlacklistEntry; | 204 class GpuBlacklistEntry; |
205 typedef scoped_refptr<GpuBlacklistEntry> ScopedGpuBlacklistEntry; | 205 typedef scoped_refptr<GpuBlacklistEntry> ScopedGpuBlacklistEntry; |
206 | 206 |
207 class GpuBlacklistEntry : public base::RefCounted<GpuBlacklistEntry> { | 207 class GpuBlacklistEntry : public base::RefCounted<GpuBlacklistEntry> { |
208 public: | 208 public: |
209 // Constructs GpuBlacklistEntry from DictionaryValue loaded from json. | 209 // Constructs GpuBlacklistEntry from DictionaryValue loaded from json. |
210 // Top-level entry must have an id number. Others are exceptions. | 210 // Top-level entry must have an id number. Others are exceptions. |
211 static GpuBlacklistEntry* GetGpuBlacklistEntryFromValue( | 211 static ScopedGpuBlacklistEntry GetGpuBlacklistEntryFromValue( |
212 base::DictionaryValue* value, bool top_level); | 212 base::DictionaryValue* value, bool top_level); |
213 | 213 |
214 // Determines if a given os/gc/driver is included in the Entry set. | 214 // Determines if a given os/gc/driver is included in the Entry set. |
215 bool Contains(OsType os_type, | 215 bool Contains(OsType os_type, |
216 const Version& os_version, | 216 const Version& os_version, |
217 const GPUInfo& gpu_info) const; | 217 const GPUInfo& gpu_info) const; |
218 | 218 |
219 // Returns the OsType. | 219 // Returns the OsType. |
220 OsType GetOsType() const; | 220 OsType GetOsType() const; |
221 | 221 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 bool SetDriverDateInfo(const std::string& date_op, | 268 bool SetDriverDateInfo(const std::string& date_op, |
269 const std::string& date_string, | 269 const std::string& date_string, |
270 const std::string& date_string2); | 270 const std::string& date_string2); |
271 | 271 |
272 bool SetGLRendererInfo(const std::string& renderer_op, | 272 bool SetGLRendererInfo(const std::string& renderer_op, |
273 const std::string& renderer_value); | 273 const std::string& renderer_value); |
274 | 274 |
275 bool SetBlacklistedFeatures( | 275 bool SetBlacklistedFeatures( |
276 const std::vector<std::string>& blacklisted_features); | 276 const std::vector<std::string>& blacklisted_features); |
277 | 277 |
278 void AddException(GpuBlacklistEntry* exception); | 278 void AddException(ScopedGpuBlacklistEntry exception); |
279 | 279 |
280 uint32 id_; | 280 uint32 id_; |
281 std::string description_; | 281 std::string description_; |
282 std::vector<int> cr_bugs_; | 282 std::vector<int> cr_bugs_; |
283 std::vector<int> webkit_bugs_; | 283 std::vector<int> webkit_bugs_; |
284 scoped_ptr<OsInfo> os_info_; | 284 scoped_ptr<OsInfo> os_info_; |
285 uint32 vendor_id_; | 285 uint32 vendor_id_; |
286 std::vector<uint32> device_id_list_; | 286 std::vector<uint32> device_id_list_; |
287 scoped_ptr<StringInfo> driver_vendor_info_; | 287 scoped_ptr<StringInfo> driver_vendor_info_; |
288 scoped_ptr<VersionInfo> driver_version_info_; | 288 scoped_ptr<VersionInfo> driver_version_info_; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 std::vector<ScopedGpuBlacklistEntry> active_entries_; | 330 std::vector<ScopedGpuBlacklistEntry> active_entries_; |
331 | 331 |
332 uint32 max_entry_id_; | 332 uint32 max_entry_id_; |
333 | 333 |
334 bool contains_unknown_fields_; | 334 bool contains_unknown_fields_; |
335 | 335 |
336 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); | 336 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); |
337 }; | 337 }; |
338 | 338 |
339 #endif // CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ | 339 #endif // CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ |
OLD | NEW |