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

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

Issue 465163002: Revert 289067 "Use RE string pattern matching for blacklist stri..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 | « trunk/src/gpu/BUILD.gn ('k') | trunk/src/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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
195 class GPU_EXPORT FloatInfo { 221 class GPU_EXPORT FloatInfo {
196 public: 222 public:
197 FloatInfo(const std::string& float_op, 223 FloatInfo(const std::string& float_op,
198 const std::string& float_value, 224 const std::string& float_value,
199 const std::string& float_value2); 225 const std::string& float_value2);
200 226
201 // Determines if a given float is included in the FloatInfo. 227 // Determines if a given float is included in the FloatInfo.
202 bool Contains(float value) const; 228 bool Contains(float value) const;
203 229
204 // Determines if the FloatInfo contains valid information. 230 // Determines if the FloatInfo contains valid information.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 bool SetVendorId(const std::string& vendor_id_string); 363 bool SetVendorId(const std::string& vendor_id_string);
338 364
339 bool AddDeviceId(const std::string& device_id_string); 365 bool AddDeviceId(const std::string& device_id_string);
340 366
341 bool SetMultiGpuStyle(const std::string& multi_gpu_style_string); 367 bool SetMultiGpuStyle(const std::string& multi_gpu_style_string);
342 368
343 bool SetMultiGpuCategory(const std::string& multi_gpu_category_string); 369 bool SetMultiGpuCategory(const std::string& multi_gpu_category_string);
344 370
345 bool SetGLType(const std::string& gl_type_string); 371 bool SetGLType(const std::string& gl_type_string);
346 372
347 bool SetDriverVendorInfo(const std::string& vendor_value); 373 bool SetDriverVendorInfo(const std::string& vendor_op,
374 const std::string& vendor_value);
348 375
349 bool SetDriverVersionInfo(const std::string& version_op, 376 bool SetDriverVersionInfo(const std::string& version_op,
350 const std::string& version_style, 377 const std::string& version_style,
351 const std::string& version_string, 378 const std::string& version_string,
352 const std::string& version_string2); 379 const std::string& version_string2);
353 380
354 bool SetDriverDateInfo(const std::string& date_op, 381 bool SetDriverDateInfo(const std::string& date_op,
355 const std::string& date_string, 382 const std::string& date_string,
356 const std::string& date_string2); 383 const std::string& date_string2);
357 384
358 bool SetGLVersionInfo(const std::string& version_op, 385 bool SetGLVersionInfo(const std::string& version_op,
359 const std::string& version_string, 386 const std::string& version_string,
360 const std::string& version_string2); 387 const std::string& version_string2);
361 388
362 bool SetGLVendorInfo(const std::string& vendor_value); 389 bool SetGLVendorInfo(const std::string& vendor_op,
390 const std::string& vendor_value);
363 391
364 bool SetGLRendererInfo(const std::string& renderer_value); 392 bool SetGLRendererInfo(const std::string& renderer_op,
393 const std::string& renderer_value);
365 394
366 bool SetGLExtensionsInfo(const std::string& extensions_value); 395 bool SetGLExtensionsInfo(const std::string& extensions_op,
396 const std::string& extensions_value);
367 397
368 bool SetGLResetNotificationStrategyInfo(const std::string& op, 398 bool SetGLResetNotificationStrategyInfo(const std::string& op,
369 const std::string& int_string, 399 const std::string& int_string,
370 const std::string& int_string2); 400 const std::string& int_string2);
371 401
372 bool SetCpuBrand(const std::string& cpu_value); 402 bool SetCpuBrand(const std::string& cpu_op,
403 const std::string& cpu_value);
373 404
374 bool SetPerfGraphicsInfo(const std::string& op, 405 bool SetPerfGraphicsInfo(const std::string& op,
375 const std::string& float_string, 406 const std::string& float_string,
376 const std::string& float_string2); 407 const std::string& float_string2);
377 408
378 bool SetPerfGamingInfo(const std::string& op, 409 bool SetPerfGamingInfo(const std::string& op,
379 const std::string& float_string, 410 const std::string& float_string,
380 const std::string& float_string2); 411 const std::string& float_string2);
381 412
382 bool SetPerfOverallInfo(const std::string& op, 413 bool SetPerfOverallInfo(const std::string& op,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 bool disabled_; 457 bool disabled_;
427 std::string description_; 458 std::string description_;
428 std::vector<int> cr_bugs_; 459 std::vector<int> cr_bugs_;
429 std::vector<int> webkit_bugs_; 460 std::vector<int> webkit_bugs_;
430 scoped_ptr<OsInfo> os_info_; 461 scoped_ptr<OsInfo> os_info_;
431 uint32 vendor_id_; 462 uint32 vendor_id_;
432 std::vector<uint32> device_id_list_; 463 std::vector<uint32> device_id_list_;
433 MultiGpuStyle multi_gpu_style_; 464 MultiGpuStyle multi_gpu_style_;
434 MultiGpuCategory multi_gpu_category_; 465 MultiGpuCategory multi_gpu_category_;
435 GLType gl_type_; 466 GLType gl_type_;
436 std::string driver_vendor_info_; 467 scoped_ptr<StringInfo> driver_vendor_info_;
437 scoped_ptr<VersionInfo> driver_version_info_; 468 scoped_ptr<VersionInfo> driver_version_info_;
438 scoped_ptr<VersionInfo> driver_date_info_; 469 scoped_ptr<VersionInfo> driver_date_info_;
439 scoped_ptr<VersionInfo> gl_version_info_; 470 scoped_ptr<VersionInfo> gl_version_info_;
440 std::string gl_vendor_info_; 471 scoped_ptr<StringInfo> gl_vendor_info_;
441 std::string gl_renderer_info_; 472 scoped_ptr<StringInfo> gl_renderer_info_;
442 std::string gl_extensions_info_; 473 scoped_ptr<StringInfo> gl_extensions_info_;
443 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_; 474 scoped_ptr<IntInfo> gl_reset_notification_strategy_info_;
444 std::string cpu_brand_; 475 scoped_ptr<StringInfo> cpu_brand_;
445 scoped_ptr<FloatInfo> perf_graphics_info_; 476 scoped_ptr<FloatInfo> perf_graphics_info_;
446 scoped_ptr<FloatInfo> perf_gaming_info_; 477 scoped_ptr<FloatInfo> perf_gaming_info_;
447 scoped_ptr<FloatInfo> perf_overall_info_; 478 scoped_ptr<FloatInfo> perf_overall_info_;
448 std::vector<std::string> machine_model_name_list_; 479 std::vector<std::string> machine_model_name_list_;
449 scoped_ptr<VersionInfo> machine_model_version_info_; 480 scoped_ptr<VersionInfo> machine_model_version_info_;
450 scoped_ptr<IntInfo> gpu_count_info_; 481 scoped_ptr<IntInfo> gpu_count_info_;
451 scoped_ptr<BoolInfo> direct_rendering_info_; 482 scoped_ptr<BoolInfo> direct_rendering_info_;
452 std::set<int> features_; 483 std::set<int> features_;
453 std::vector<ScopedGpuControlListEntry> exceptions_; 484 std::vector<ScopedGpuControlListEntry> exceptions_;
454 }; 485 };
(...skipping 24 matching lines...) Expand all
479 bool supports_feature_type_all_; 510 bool supports_feature_type_all_;
480 511
481 bool control_list_logging_enabled_; 512 bool control_list_logging_enabled_;
482 std::string control_list_logging_name_; 513 std::string control_list_logging_name_;
483 }; 514 };
484 515
485 } // namespace gpu 516 } // namespace gpu
486 517
487 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ 518 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_
488 519
OLDNEW
« no previous file with comments | « trunk/src/gpu/BUILD.gn ('k') | trunk/src/gpu/config/gpu_control_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698