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

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

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 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
« 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
11 #include <set> 12 #include <set>
12 #include <string> 13 #include <string>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/containers/hash_tables.h" 16 #include "base/containers/hash_tables.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "gpu/gpu_export.h" 20 #include "gpu/gpu_export.h"
21 21
22 namespace gpu { 22 namespace gpu {
23 struct GPUInfo; 23 struct GPUInfo;
24 24
25 class GPU_EXPORT GpuControlList { 25 class GPU_EXPORT GpuControlList {
26 public: 26 public:
27 enum OsType { 27 enum OsType {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // Determines if the VersionInfo contains valid information. 186 // Determines if the VersionInfo contains valid information.
187 bool IsValid() const; 187 bool IsValid() const;
188 188
189 OsType type() const; 189 OsType type() const;
190 190
191 // Maps string to OsType; returns kOsUnknown if it's not a valid os. 191 // Maps string to OsType; returns kOsUnknown if it's not a valid os.
192 static OsType StringToOsType(const std::string& os); 192 static OsType StringToOsType(const std::string& os);
193 193
194 private: 194 private:
195 OsType type_; 195 OsType type_;
196 scoped_ptr<VersionInfo> version_info_; 196 std::unique_ptr<VersionInfo> version_info_;
197 }; 197 };
198 198
199 class GPU_EXPORT FloatInfo { 199 class GPU_EXPORT FloatInfo {
200 public: 200 public:
201 FloatInfo(const std::string& float_op, 201 FloatInfo(const std::string& float_op,
202 const std::string& float_value, 202 const std::string& float_value,
203 const std::string& float_value2); 203 const std::string& float_value2);
204 204
205 // Determines if a given float is included in the FloatInfo. 205 // Determines if a given float is included in the FloatInfo.
206 bool Contains(float value) const; 206 bool Contains(float value) const;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 // Return the default GL type, depending on the OS. 429 // Return the default GL type, depending on the OS.
430 // See GLType declaration. 430 // See GLType declaration.
431 static GLType GetDefaultGLType(); 431 static GLType GetDefaultGLType();
432 432
433 uint32_t id_; 433 uint32_t id_;
434 bool disabled_; 434 bool disabled_;
435 std::string description_; 435 std::string description_;
436 std::vector<int> cr_bugs_; 436 std::vector<int> cr_bugs_;
437 std::vector<int> webkit_bugs_; 437 std::vector<int> webkit_bugs_;
438 std::vector<std::string> disabled_extensions_; 438 std::vector<std::string> disabled_extensions_;
439 scoped_ptr<OsInfo> os_info_; 439 std::unique_ptr<OsInfo> os_info_;
440 uint32_t vendor_id_; 440 uint32_t vendor_id_;
441 std::vector<uint32_t> device_id_list_; 441 std::vector<uint32_t> device_id_list_;
442 MultiGpuStyle multi_gpu_style_; 442 MultiGpuStyle multi_gpu_style_;
443 MultiGpuCategory multi_gpu_category_; 443 MultiGpuCategory multi_gpu_category_;
444 GLType gl_type_; 444 GLType gl_type_;
445 std::string driver_vendor_info_; 445 std::string driver_vendor_info_;
446 scoped_ptr<VersionInfo> driver_version_info_; 446 std::unique_ptr<VersionInfo> driver_version_info_;
447 scoped_ptr<VersionInfo> driver_date_info_; 447 std::unique_ptr<VersionInfo> driver_date_info_;
448 scoped_ptr<VersionInfo> gl_version_info_; 448 std::unique_ptr<VersionInfo> gl_version_info_;
449 std::string gl_vendor_info_; 449 std::string gl_vendor_info_;
450 std::string gl_renderer_info_; 450 std::string gl_renderer_info_;
451 std::string gl_extensions_info_; 451 std::string gl_extensions_info_;
452 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_; 452 std::unique_ptr<IntInfo> gl_reset_notification_strategy_info_;
453 std::string cpu_brand_; 453 std::string cpu_brand_;
454 scoped_ptr<FloatInfo> perf_graphics_info_; 454 std::unique_ptr<FloatInfo> perf_graphics_info_;
455 scoped_ptr<FloatInfo> perf_gaming_info_; 455 std::unique_ptr<FloatInfo> perf_gaming_info_;
456 scoped_ptr<FloatInfo> perf_overall_info_; 456 std::unique_ptr<FloatInfo> perf_overall_info_;
457 std::vector<std::string> machine_model_name_list_; 457 std::vector<std::string> machine_model_name_list_;
458 scoped_ptr<VersionInfo> machine_model_version_info_; 458 std::unique_ptr<VersionInfo> machine_model_version_info_;
459 scoped_ptr<IntInfo> gpu_count_info_; 459 std::unique_ptr<IntInfo> gpu_count_info_;
460 scoped_ptr<BoolInfo> direct_rendering_info_; 460 std::unique_ptr<BoolInfo> direct_rendering_info_;
461 scoped_ptr<BoolInfo> in_process_gpu_info_; 461 std::unique_ptr<BoolInfo> in_process_gpu_info_;
462 std::set<int> features_; 462 std::set<int> features_;
463 std::vector<ScopedGpuControlListEntry> exceptions_; 463 std::vector<ScopedGpuControlListEntry> exceptions_;
464 }; 464 };
465 465
466 // Gets the current OS type. 466 // Gets the current OS type.
467 static OsType GetOsType(); 467 static OsType GetOsType();
468 468
469 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter); 469 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter);
470 470
471 void Clear(); 471 void Clear();
(...skipping 17 matching lines...) Expand all
489 bool supports_feature_type_all_; 489 bool supports_feature_type_all_;
490 490
491 bool control_list_logging_enabled_; 491 bool control_list_logging_enabled_;
492 std::string control_list_logging_name_; 492 std::string control_list_logging_name_;
493 }; 493 };
494 494
495 } // namespace gpu 495 } // namespace gpu
496 496
497 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ 497 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_
498 498
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