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

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

Issue 23534006: Enable GPU blacklist in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r223354 -- think AcceleratedCompositingBlockedTest.AcceleratedCompositingBlocked is fix… Created 7 years, 3 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 | « content/public/test/browser_test_base.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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool contains_unknown_fields() const { return contains_unknown_fields_; } 89 bool contains_unknown_fields() const { return contains_unknown_fields_; }
90 90
91 // Returns the number of entries. This is only for tests. 91 // Returns the number of entries. This is only for tests.
92 size_t num_entries() const; 92 size_t num_entries() const;
93 93
94 // Register a feature to FeatureMap - used to construct a GpuControlList. 94 // Register a feature to FeatureMap - used to construct a GpuControlList.
95 void AddSupportedFeature(const std::string& feature_name, int feature_id); 95 void AddSupportedFeature(const std::string& feature_name, int feature_id);
96 // Register whether "all" is recognized as all features. 96 // Register whether "all" is recognized as all features.
97 void set_supports_feature_type_all(bool supported); 97 void set_supports_feature_type_all(bool supported);
98 98
99 // Enables logging of control list decisions.
100 void enable_control_list_logging() { control_list_logging_enabled_ = true; }
101
99 private: 102 private:
100 friend class GpuControlListEntryTest; 103 friend class GpuControlListEntryTest;
101 friend class MachineModelInfoTest; 104 friend class MachineModelInfoTest;
102 friend class NumberInfoTest; 105 friend class NumberInfoTest;
103 friend class OsInfoTest; 106 friend class OsInfoTest;
104 friend class StringInfoTest; 107 friend class StringInfoTest;
105 friend class VersionInfoTest; 108 friend class VersionInfoTest;
106 109
107 enum BrowserVersionSupport { 110 enum BrowserVersionSupport {
108 kSupported, 111 kSupported,
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 class GPU_EXPORT GpuControlListEntry 288 class GPU_EXPORT GpuControlListEntry
286 : public base::RefCounted<GpuControlListEntry> { 289 : public base::RefCounted<GpuControlListEntry> {
287 public: 290 public:
288 // Constructs GpuControlListEntry from DictionaryValue loaded from json. 291 // Constructs GpuControlListEntry from DictionaryValue loaded from json.
289 // Top-level entry must have an id number. Others are exceptions. 292 // Top-level entry must have an id number. Others are exceptions.
290 static ScopedGpuControlListEntry GetEntryFromValue( 293 static ScopedGpuControlListEntry GetEntryFromValue(
291 const base::DictionaryValue* value, bool top_level, 294 const base::DictionaryValue* value, bool top_level,
292 const FeatureMap& feature_map, 295 const FeatureMap& feature_map,
293 bool supports_feature_type_all); 296 bool supports_feature_type_all);
294 297
298 // Logs a control list match for this rule.
299 void LogControlListMatch() const;
300
295 // Determines if a given os/gc/machine_model/driver is included in the 301 // Determines if a given os/gc/machine_model/driver is included in the
296 // Entry set. 302 // Entry set.
297 bool Contains(OsType os_type, const std::string& os_version, 303 bool Contains(OsType os_type, const std::string& os_version,
298 const GPUInfo& gpu_info) const; 304 const GPUInfo& gpu_info) const;
299 305
300 // Determines whether we needs more gpu info to make the blacklisting 306 // Determines whether we needs more gpu info to make the blacklisting
301 // decision. It should only be checked if Contains() returns true. 307 // decision. It should only be checked if Contains() returns true.
302 bool NeedsMoreInfo(const GPUInfo& gpu_info) const; 308 bool NeedsMoreInfo(const GPUInfo& gpu_info) const;
303 309
304 // Returns the OsType. 310 // Returns the OsType.
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 494
489 uint32 max_entry_id_; 495 uint32 max_entry_id_;
490 496
491 bool contains_unknown_fields_; 497 bool contains_unknown_fields_;
492 498
493 bool needs_more_info_; 499 bool needs_more_info_;
494 500
495 // The features a GpuControlList recognizes and handles. 501 // The features a GpuControlList recognizes and handles.
496 FeatureMap feature_map_; 502 FeatureMap feature_map_;
497 bool supports_feature_type_all_; 503 bool supports_feature_type_all_;
504
505 bool control_list_logging_enabled_;
498 }; 506 };
499 507
500 } // namespace gpu 508 } // namespace gpu
501 509
502 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_ 510 #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_
503 511
OLDNEW
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | gpu/config/gpu_control_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698