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

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: rebase 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(const std::string& bool_value);
260
261 // Determines if a given int is included in the IntInfo.
262 bool Contains(bool value) const;
263
264 // Determines if the IntInfo contains valid information.
265 bool IsValid() const;
266
267 private:
268 bool valid_;
269 bool value_;
270 };
271
257 class GPU_EXPORT MachineModelInfo { 272 class GPU_EXPORT MachineModelInfo {
258 public: 273 public:
259 MachineModelInfo(const std::string& name_op, 274 MachineModelInfo(const std::string& name_op,
260 const std::string& name_value, 275 const std::string& name_value,
261 const std::string& version_op, 276 const std::string& version_op,
262 const std::string& version_string, 277 const std::string& version_string,
263 const std::string& version_string2); 278 const std::string& version_string2);
264 ~MachineModelInfo(); 279 ~MachineModelInfo();
265 280
266 // Determines if a given name/version is included in the MachineModelInfo. 281 // 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, 421 bool SetMachineModelInfo(const std::string& name_op,
407 const std::string& name_value, 422 const std::string& name_value,
408 const std::string& version_op, 423 const std::string& version_op,
409 const std::string& version_string, 424 const std::string& version_string,
410 const std::string& version_string2); 425 const std::string& version_string2);
411 426
412 bool SetGpuCountInfo(const std::string& op, 427 bool SetGpuCountInfo(const std::string& op,
413 const std::string& int_string, 428 const std::string& int_string,
414 const std::string& int_string2); 429 const std::string& int_string2);
415 430
431 bool SetDirectRenderingInfo(const std::string& bool_string);
432
416 bool SetFeatures(const std::vector<std::string>& features, 433 bool SetFeatures(const std::vector<std::string>& features,
417 const FeatureMap& feature_map, 434 const FeatureMap& feature_map,
418 bool supports_feature_type_all); 435 bool supports_feature_type_all);
419 436
420 void AddException(ScopedGpuControlListEntry exception); 437 void AddException(ScopedGpuControlListEntry exception);
421 438
422 static MultiGpuStyle StringToMultiGpuStyle(const std::string& style); 439 static MultiGpuStyle StringToMultiGpuStyle(const std::string& style);
423 440
424 static MultiGpuCategory StringToMultiGpuCategory( 441 static MultiGpuCategory StringToMultiGpuCategory(
425 const std::string& category); 442 const std::string& category);
(...skipping 20 matching lines...) Expand all
446 scoped_ptr<StringInfo> gl_vendor_info_; 463 scoped_ptr<StringInfo> gl_vendor_info_;
447 scoped_ptr<StringInfo> gl_renderer_info_; 464 scoped_ptr<StringInfo> gl_renderer_info_;
448 scoped_ptr<StringInfo> gl_extensions_info_; 465 scoped_ptr<StringInfo> gl_extensions_info_;
449 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_; 466 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_;
450 scoped_ptr<StringInfo> cpu_brand_; 467 scoped_ptr<StringInfo> cpu_brand_;
451 scoped_ptr<FloatInfo> perf_graphics_info_; 468 scoped_ptr<FloatInfo> perf_graphics_info_;
452 scoped_ptr<FloatInfo> perf_gaming_info_; 469 scoped_ptr<FloatInfo> perf_gaming_info_;
453 scoped_ptr<FloatInfo> perf_overall_info_; 470 scoped_ptr<FloatInfo> perf_overall_info_;
454 scoped_ptr<MachineModelInfo> machine_model_info_; 471 scoped_ptr<MachineModelInfo> machine_model_info_;
455 scoped_ptr<IntInfo> gpu_count_info_; 472 scoped_ptr<IntInfo> gpu_count_info_;
473 scoped_ptr<BoolInfo> direct_rendering_info_;
456 std::set<int> features_; 474 std::set<int> features_;
457 std::vector<ScopedGpuControlListEntry> exceptions_; 475 std::vector<ScopedGpuControlListEntry> exceptions_;
458 }; 476 };
459 477
460 // Gets the current OS type. 478 // Gets the current OS type.
461 static OsType GetOsType(); 479 static OsType GetOsType();
462 480
463 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter); 481 bool LoadList(const base::DictionaryValue& parsed_json, OsFilter os_filter);
464 482
465 void Clear(); 483 void Clear();
(...skipping 17 matching lines...) Expand all
483 bool supports_feature_type_all_; 501 bool supports_feature_type_all_;
484 502
485 bool control_list_logging_enabled_; 503 bool control_list_logging_enabled_;
486 std::string control_list_logging_name_; 504 std::string control_list_logging_name_;
487 }; 505 };
488 506
489 } // namespace gpu 507 } // namespace gpu
490 508
491 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ 509 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_
492 510
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698