Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: gpu/config/gpu_control_list.h

Issue 241793002: Fix machine_model behaviors in gpu blacklist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/config/gpu_blacklist_unittest.cc ('k') | gpu/config/gpu_control_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 GPU_CONFIG_GPU_CONTROL_LIST_H_ 5 #ifndef GPU_CONFIG_GPU_CONTROL_LIST_H_
6 #define GPU_CONFIG_GPU_CONTROL_LIST_H_ 6 #define GPU_CONFIG_GPU_CONTROL_LIST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 public: 258 public:
259 explicit BoolInfo(bool value); 259 explicit BoolInfo(bool value);
260 260
261 // Determines if a given bool is included in the BoolInfo. 261 // Determines if a given bool is included in the BoolInfo.
262 bool Contains(bool value) const; 262 bool Contains(bool value) const;
263 263
264 private: 264 private:
265 bool value_; 265 bool value_;
266 }; 266 };
267 267
268 class GPU_EXPORT MachineModelInfo {
269 public:
270 MachineModelInfo(const std::string& name_op,
271 const std::string& name_value,
272 const std::string& version_op,
273 const std::string& version_string,
274 const std::string& version_string2);
275 ~MachineModelInfo();
276
277 // Determines if a given name/version is included in the MachineModelInfo.
278 bool Contains(const std::string& name, const std::string& version) const;
279
280 // Determines if the MachineModelInfo contains valid information.
281 bool IsValid() const;
282
283 private:
284 scoped_ptr<StringInfo> name_info_;
285 scoped_ptr<VersionInfo> version_info_;
286 };
287
288 class GpuControlListEntry; 268 class GpuControlListEntry;
289 typedef scoped_refptr<GpuControlListEntry> ScopedGpuControlListEntry; 269 typedef scoped_refptr<GpuControlListEntry> ScopedGpuControlListEntry;
290 270
291 typedef base::hash_map<std::string, int> FeatureMap; 271 typedef base::hash_map<std::string, int> FeatureMap;
292 272
293 class GPU_EXPORT GpuControlListEntry 273 class GPU_EXPORT GpuControlListEntry
294 : public base::RefCounted<GpuControlListEntry> { 274 : public base::RefCounted<GpuControlListEntry> {
295 public: 275 public:
296 // Constructs GpuControlListEntry from DictionaryValue loaded from json. 276 // Constructs GpuControlListEntry from DictionaryValue loaded from json.
297 // Top-level entry must have an id number. Others are exceptions. 277 // Top-level entry must have an id number. Others are exceptions.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 const std::string& float_string2); 392 const std::string& float_string2);
413 393
414 bool SetPerfGamingInfo(const std::string& op, 394 bool SetPerfGamingInfo(const std::string& op,
415 const std::string& float_string, 395 const std::string& float_string,
416 const std::string& float_string2); 396 const std::string& float_string2);
417 397
418 bool SetPerfOverallInfo(const std::string& op, 398 bool SetPerfOverallInfo(const std::string& op,
419 const std::string& float_string, 399 const std::string& float_string,
420 const std::string& float_string2); 400 const std::string& float_string2);
421 401
422 bool SetMachineModelInfo(const std::string& name_op, 402 bool AddMachineModelName(const std::string& model_name);
423 const std::string& name_value, 403
424 const std::string& version_op, 404 bool SetMachineModelVersionInfo(const std::string& version_op,
425 const std::string& version_string, 405 const std::string& version_string,
426 const std::string& version_string2); 406 const std::string& version_string2);
427 407
428 bool SetGpuCountInfo(const std::string& op, 408 bool SetGpuCountInfo(const std::string& op,
429 const std::string& int_string, 409 const std::string& int_string,
430 const std::string& int_string2); 410 const std::string& int_string2);
431 411
432 void SetDirectRenderingInfo(bool value); 412 void SetDirectRenderingInfo(bool value);
433 413
434 bool SetFeatures(const std::vector<std::string>& features, 414 bool SetFeatures(const std::vector<std::string>& features,
435 const FeatureMap& feature_map, 415 const FeatureMap& feature_map,
436 bool supports_feature_type_all); 416 bool supports_feature_type_all);
(...skipping 25 matching lines...) Expand all
462 scoped_ptr<VersionInfo> driver_version_info_; 442 scoped_ptr<VersionInfo> driver_version_info_;
463 scoped_ptr<VersionInfo> driver_date_info_; 443 scoped_ptr<VersionInfo> driver_date_info_;
464 scoped_ptr<StringInfo> gl_vendor_info_; 444 scoped_ptr<StringInfo> gl_vendor_info_;
465 scoped_ptr<StringInfo> gl_renderer_info_; 445 scoped_ptr<StringInfo> gl_renderer_info_;
466 scoped_ptr<StringInfo> gl_extensions_info_; 446 scoped_ptr<StringInfo> gl_extensions_info_;
467 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_; 447 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_;
468 scoped_ptr<StringInfo> cpu_brand_; 448 scoped_ptr<StringInfo> cpu_brand_;
469 scoped_ptr<FloatInfo> perf_graphics_info_; 449 scoped_ptr<FloatInfo> perf_graphics_info_;
470 scoped_ptr<FloatInfo> perf_gaming_info_; 450 scoped_ptr<FloatInfo> perf_gaming_info_;
471 scoped_ptr<FloatInfo> perf_overall_info_; 451 scoped_ptr<FloatInfo> perf_overall_info_;
472 scoped_ptr<MachineModelInfo> machine_model_info_; 452 std::vector<std::string> machine_model_name_list_;
453 scoped_ptr<VersionInfo> machine_model_version_info_;
473 scoped_ptr<IntInfo> gpu_count_info_; 454 scoped_ptr<IntInfo> gpu_count_info_;
474 scoped_ptr<BoolInfo> direct_rendering_info_; 455 scoped_ptr<BoolInfo> direct_rendering_info_;
475 std::set<int> features_; 456 std::set<int> features_;
476 std::vector<ScopedGpuControlListEntry> exceptions_; 457 std::vector<ScopedGpuControlListEntry> exceptions_;
477 }; 458 };
478 459
479 // Gets the current OS type. 460 // Gets the current OS type.
480 static OsType GetOsType(); 461 static OsType GetOsType();
481 462
482 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter); 463 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter);
(...skipping 19 matching lines...) Expand all
502 bool supports_feature_type_all_; 483 bool supports_feature_type_all_;
503 484
504 bool control_list_logging_enabled_; 485 bool control_list_logging_enabled_;
505 std::string control_list_logging_name_; 486 std::string control_list_logging_name_;
506 }; 487 };
507 488
508 } // namespace gpu 489 } // namespace gpu
509 490
510 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ 491 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_
511 492
OLDNEW
« no previous file with comments | « gpu/config/gpu_blacklist_unittest.cc ('k') | gpu/config/gpu_control_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698