| OLD | NEW |
| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 OsType type() const; | 185 OsType type() const; |
| 186 | 186 |
| 187 // Maps string to OsType; returns kOsUnknown if it's not a valid os. | 187 // Maps string to OsType; returns kOsUnknown if it's not a valid os. |
| 188 static OsType StringToOsType(const std::string& os); | 188 static OsType StringToOsType(const std::string& os); |
| 189 | 189 |
| 190 private: | 190 private: |
| 191 OsType type_; | 191 OsType type_; |
| 192 scoped_ptr<VersionInfo> version_info_; | 192 scoped_ptr<VersionInfo> version_info_; |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 class GPU_EXPORT StringInfo { | |
| 196 public: | |
| 197 StringInfo(const std::string& string_op, const std::string& string_value); | |
| 198 | |
| 199 // Determines if a given string is included in the StringInfo. | |
| 200 bool Contains(const std::string& value) const; | |
| 201 | |
| 202 // Determines if the StringInfo contains valid information. | |
| 203 bool IsValid() const; | |
| 204 | |
| 205 private: | |
| 206 enum Op { | |
| 207 kContains, | |
| 208 kBeginWith, | |
| 209 kEndWith, | |
| 210 kEQ, // = | |
| 211 kUnknown // Indicates StringInfo data is invalid. | |
| 212 }; | |
| 213 | |
| 214 // Maps string to Op; returns kUnknown if it's not a valid Op. | |
| 215 static Op StringToOp(const std::string& string_op); | |
| 216 | |
| 217 Op op_; | |
| 218 std::string value_; | |
| 219 }; | |
| 220 | |
| 221 class GPU_EXPORT FloatInfo { | 195 class GPU_EXPORT FloatInfo { |
| 222 public: | 196 public: |
| 223 FloatInfo(const std::string& float_op, | 197 FloatInfo(const std::string& float_op, |
| 224 const std::string& float_value, | 198 const std::string& float_value, |
| 225 const std::string& float_value2); | 199 const std::string& float_value2); |
| 226 | 200 |
| 227 // Determines if a given float is included in the FloatInfo. | 201 // Determines if a given float is included in the FloatInfo. |
| 228 bool Contains(float value) const; | 202 bool Contains(float value) const; |
| 229 | 203 |
| 230 // Determines if the FloatInfo contains valid information. | 204 // Determines if the FloatInfo contains valid information. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 bool SetVendorId(const std::string& vendor_id_string); | 337 bool SetVendorId(const std::string& vendor_id_string); |
| 364 | 338 |
| 365 bool AddDeviceId(const std::string& device_id_string); | 339 bool AddDeviceId(const std::string& device_id_string); |
| 366 | 340 |
| 367 bool SetMultiGpuStyle(const std::string& multi_gpu_style_string); | 341 bool SetMultiGpuStyle(const std::string& multi_gpu_style_string); |
| 368 | 342 |
| 369 bool SetMultiGpuCategory(const std::string& multi_gpu_category_string); | 343 bool SetMultiGpuCategory(const std::string& multi_gpu_category_string); |
| 370 | 344 |
| 371 bool SetGLType(const std::string& gl_type_string); | 345 bool SetGLType(const std::string& gl_type_string); |
| 372 | 346 |
| 373 bool SetDriverVendorInfo(const std::string& vendor_op, | 347 bool SetDriverVendorInfo(const std::string& vendor_value); |
| 374 const std::string& vendor_value); | |
| 375 | 348 |
| 376 bool SetDriverVersionInfo(const std::string& version_op, | 349 bool SetDriverVersionInfo(const std::string& version_op, |
| 377 const std::string& version_style, | 350 const std::string& version_style, |
| 378 const std::string& version_string, | 351 const std::string& version_string, |
| 379 const std::string& version_string2); | 352 const std::string& version_string2); |
| 380 | 353 |
| 381 bool SetDriverDateInfo(const std::string& date_op, | 354 bool SetDriverDateInfo(const std::string& date_op, |
| 382 const std::string& date_string, | 355 const std::string& date_string, |
| 383 const std::string& date_string2); | 356 const std::string& date_string2); |
| 384 | 357 |
| 385 bool SetGLVersionInfo(const std::string& version_op, | 358 bool SetGLVersionInfo(const std::string& version_op, |
| 386 const std::string& version_string, | 359 const std::string& version_string, |
| 387 const std::string& version_string2); | 360 const std::string& version_string2); |
| 388 | 361 |
| 389 bool SetGLVendorInfo(const std::string& vendor_op, | 362 bool SetGLVendorInfo(const std::string& vendor_value); |
| 390 const std::string& vendor_value); | |
| 391 | 363 |
| 392 bool SetGLRendererInfo(const std::string& renderer_op, | 364 bool SetGLRendererInfo(const std::string& renderer_value); |
| 393 const std::string& renderer_value); | |
| 394 | 365 |
| 395 bool SetGLExtensionsInfo(const std::string& extensions_op, | 366 bool SetGLExtensionsInfo(const std::string& extensions_value); |
| 396 const std::string& extensions_value); | |
| 397 | 367 |
| 398 bool SetGLResetNotificationStrategyInfo(const std::string& op, | 368 bool SetGLResetNotificationStrategyInfo(const std::string& op, |
| 399 const std::string& int_string, | 369 const std::string& int_string, |
| 400 const std::string& int_string2); | 370 const std::string& int_string2); |
| 401 | 371 |
| 402 bool SetCpuBrand(const std::string& cpu_op, | 372 bool SetCpuBrand(const std::string& cpu_value); |
| 403 const std::string& cpu_value); | |
| 404 | 373 |
| 405 bool SetPerfGraphicsInfo(const std::string& op, | 374 bool SetPerfGraphicsInfo(const std::string& op, |
| 406 const std::string& float_string, | 375 const std::string& float_string, |
| 407 const std::string& float_string2); | 376 const std::string& float_string2); |
| 408 | 377 |
| 409 bool SetPerfGamingInfo(const std::string& op, | 378 bool SetPerfGamingInfo(const std::string& op, |
| 410 const std::string& float_string, | 379 const std::string& float_string, |
| 411 const std::string& float_string2); | 380 const std::string& float_string2); |
| 412 | 381 |
| 413 bool SetPerfOverallInfo(const std::string& op, | 382 bool SetPerfOverallInfo(const std::string& op, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 bool disabled_; | 426 bool disabled_; |
| 458 std::string description_; | 427 std::string description_; |
| 459 std::vector<int> cr_bugs_; | 428 std::vector<int> cr_bugs_; |
| 460 std::vector<int> webkit_bugs_; | 429 std::vector<int> webkit_bugs_; |
| 461 scoped_ptr<OsInfo> os_info_; | 430 scoped_ptr<OsInfo> os_info_; |
| 462 uint32 vendor_id_; | 431 uint32 vendor_id_; |
| 463 std::vector<uint32> device_id_list_; | 432 std::vector<uint32> device_id_list_; |
| 464 MultiGpuStyle multi_gpu_style_; | 433 MultiGpuStyle multi_gpu_style_; |
| 465 MultiGpuCategory multi_gpu_category_; | 434 MultiGpuCategory multi_gpu_category_; |
| 466 GLType gl_type_; | 435 GLType gl_type_; |
| 467 scoped_ptr<StringInfo> driver_vendor_info_; | 436 std::string driver_vendor_info_; |
| 468 scoped_ptr<VersionInfo> driver_version_info_; | 437 scoped_ptr<VersionInfo> driver_version_info_; |
| 469 scoped_ptr<VersionInfo> driver_date_info_; | 438 scoped_ptr<VersionInfo> driver_date_info_; |
| 470 scoped_ptr<VersionInfo> gl_version_info_; | 439 scoped_ptr<VersionInfo> gl_version_info_; |
| 471 scoped_ptr<StringInfo> gl_vendor_info_; | 440 std::string gl_vendor_info_; |
| 472 scoped_ptr<StringInfo> gl_renderer_info_; | 441 std::string gl_renderer_info_; |
| 473 scoped_ptr<StringInfo> gl_extensions_info_; | 442 std::string gl_extensions_info_; |
| 474 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_; | 443 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_; |
| 475 scoped_ptr<StringInfo> cpu_brand_; | 444 std::string cpu_brand_; |
| 476 scoped_ptr<FloatInfo> perf_graphics_info_; | 445 scoped_ptr<FloatInfo> perf_graphics_info_; |
| 477 scoped_ptr<FloatInfo> perf_gaming_info_; | 446 scoped_ptr<FloatInfo> perf_gaming_info_; |
| 478 scoped_ptr<FloatInfo> perf_overall_info_; | 447 scoped_ptr<FloatInfo> perf_overall_info_; |
| 479 std::vector<std::string> machine_model_name_list_; | 448 std::vector<std::string> machine_model_name_list_; |
| 480 scoped_ptr<VersionInfo> machine_model_version_info_; | 449 scoped_ptr<VersionInfo> machine_model_version_info_; |
| 481 scoped_ptr<IntInfo> gpu_count_info_; | 450 scoped_ptr<IntInfo> gpu_count_info_; |
| 482 scoped_ptr<BoolInfo> direct_rendering_info_; | 451 scoped_ptr<BoolInfo> direct_rendering_info_; |
| 483 std::set<int> features_; | 452 std::set<int> features_; |
| 484 std::vector<ScopedGpuControlListEntry> exceptions_; | 453 std::vector<ScopedGpuControlListEntry> exceptions_; |
| 485 }; | 454 }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 510 bool supports_feature_type_all_; | 479 bool supports_feature_type_all_; |
| 511 | 480 |
| 512 bool control_list_logging_enabled_; | 481 bool control_list_logging_enabled_; |
| 513 std::string control_list_logging_name_; | 482 std::string control_list_logging_name_; |
| 514 }; | 483 }; |
| 515 | 484 |
| 516 } // namespace gpu | 485 } // namespace gpu |
| 517 | 486 |
| 518 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ | 487 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ |
| 519 | 488 |
| OLD | NEW |