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

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

Issue 194303002: Blacklist GLX indirect rendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix various bugs Created 6 years, 9 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
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 // Determines if the IntInfo contains valid information. 248 // Determines if the IntInfo contains valid information.
249 bool IsValid() const; 249 bool IsValid() const;
250 250
251 private: 251 private:
252 NumericOp op_; 252 NumericOp op_;
253 int value_; 253 int value_;
254 int value2_; 254 int value2_;
255 }; 255 };
256 256
257 class GPU_EXPORT BoolInfo {
258 public:
259 explicit BoolInfo(bool value);
piman 2014/03/11 21:32:45 I realized that the format natively supports bools
260
261 // Determines if a given bool is included in the BoolInfo.
262 bool Contains(bool value) const;
263
264 private:
265 bool value_;
266 };
267
257 class GPU_EXPORT MachineModelInfo { 268 class GPU_EXPORT MachineModelInfo {
258 public: 269 public:
259 MachineModelInfo(const std::string& name_op, 270 MachineModelInfo(const std::string& name_op,
260 const std::string& name_value, 271 const std::string& name_value,
261 const std::string& version_op, 272 const std::string& version_op,
262 const std::string& version_string, 273 const std::string& version_string,
263 const std::string& version_string2); 274 const std::string& version_string2);
264 ~MachineModelInfo(); 275 ~MachineModelInfo();
265 276
266 // Determines if a given name/version is included in the MachineModelInfo. 277 // Determines if a given name/version is included in the MachineModelInfo.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 bool SetMachineModelInfo(const std::string& name_op, 417 bool SetMachineModelInfo(const std::string& name_op,
407 const std::string& name_value, 418 const std::string& name_value,
408 const std::string& version_op, 419 const std::string& version_op,
409 const std::string& version_string, 420 const std::string& version_string,
410 const std::string& version_string2); 421 const std::string& version_string2);
411 422
412 bool SetGpuCountInfo(const std::string& op, 423 bool SetGpuCountInfo(const std::string& op,
413 const std::string& int_string, 424 const std::string& int_string,
414 const std::string& int_string2); 425 const std::string& int_string2);
415 426
427 void SetDirectRenderingInfo(bool value);
428
416 bool SetFeatures(const std::vector<std::string>& features, 429 bool SetFeatures(const std::vector<std::string>& features,
417 const FeatureMap& feature_map, 430 const FeatureMap& feature_map,
418 bool supports_feature_type_all); 431 bool supports_feature_type_all);
419 432
420 void AddException(ScopedGpuControlListEntry exception); 433 void AddException(ScopedGpuControlListEntry exception);
421 434
422 static MultiGpuStyle StringToMultiGpuStyle(const std::string& style); 435 static MultiGpuStyle StringToMultiGpuStyle(const std::string& style);
423 436
424 static MultiGpuCategory StringToMultiGpuCategory( 437 static MultiGpuCategory StringToMultiGpuCategory(
425 const std::string& category); 438 const std::string& category);
(...skipping 20 matching lines...) Expand all
446 scoped_ptr<StringInfo> gl_vendor_info_; 459 scoped_ptr<StringInfo> gl_vendor_info_;
447 scoped_ptr<StringInfo> gl_renderer_info_; 460 scoped_ptr<StringInfo> gl_renderer_info_;
448 scoped_ptr<StringInfo> gl_extensions_info_; 461 scoped_ptr<StringInfo> gl_extensions_info_;
449 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_; 462 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_;
450 scoped_ptr<StringInfo> cpu_brand_; 463 scoped_ptr<StringInfo> cpu_brand_;
451 scoped_ptr<FloatInfo> perf_graphics_info_; 464 scoped_ptr<FloatInfo> perf_graphics_info_;
452 scoped_ptr<FloatInfo> perf_gaming_info_; 465 scoped_ptr<FloatInfo> perf_gaming_info_;
453 scoped_ptr<FloatInfo> perf_overall_info_; 466 scoped_ptr<FloatInfo> perf_overall_info_;
454 scoped_ptr<MachineModelInfo> machine_model_info_; 467 scoped_ptr<MachineModelInfo> machine_model_info_;
455 scoped_ptr<IntInfo> gpu_count_info_; 468 scoped_ptr<IntInfo> gpu_count_info_;
469 scoped_ptr<BoolInfo> direct_rendering_info_;
456 std::set<int> features_; 470 std::set<int> features_;
457 std::vector<ScopedGpuControlListEntry> exceptions_; 471 std::vector<ScopedGpuControlListEntry> exceptions_;
458 }; 472 };
459 473
460 // Gets the current OS type. 474 // Gets the current OS type.
461 static OsType GetOsType(); 475 static OsType GetOsType();
462 476
463 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter); 477 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter);
464 478
465 void Clear(); 479 void Clear();
(...skipping 17 matching lines...) Expand all
483 bool supports_feature_type_all_; 497 bool supports_feature_type_all_;
484 498
485 bool control_list_logging_enabled_; 499 bool control_list_logging_enabled_;
486 std::string control_list_logging_name_; 500 std::string control_list_logging_name_;
487 }; 501 };
488 502
489 } // namespace gpu 503 } // namespace gpu
490 504
491 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ 505 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_
492 506
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698