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

Side by Side Diff: content/browser/gpu/gpu_blacklist.h

Issue 11047011: Figure out whether we have enough information to make the final GPU blacklisting decision. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_
6 #define CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ 6 #define CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // "webkitBugs": [] 85 // "webkitBugs": []
86 // } 86 // }
87 void GetBlacklistReasons(ListValue* problem_list) const; 87 void GetBlacklistReasons(ListValue* problem_list) const;
88 88
89 // Return the largest entry id. This is used for histogramming. 89 // Return the largest entry id. This is used for histogramming.
90 uint32 max_entry_id() const; 90 uint32 max_entry_id() const;
91 91
92 // Returns the version of the current blacklist. 92 // Returns the version of the current blacklist.
93 std::string GetVersion() const; 93 std::string GetVersion() const;
94 94
95 // Check if we needs more gpu info to make the blacklisting decisions.
96 // This is computed from the last MakeBlacklistDecision() call.
97 // If yes, we should create a gl context and do a full gpu info collection.
98 bool needs_more_info() const { return needs_more_info_; }
99
95 private: 100 private:
96 friend class GpuBlacklistTest; 101 friend class GpuBlacklistTest;
97 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, ChromeVersionEntry); 102 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, ChromeVersionEntry);
98 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, CurrentBlacklistValidation); 103 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, CurrentBlacklistValidation);
99 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, UnknownField); 104 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, UnknownField);
100 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, UnknownExceptionField); 105 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, UnknownExceptionField);
101 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, UnknownFeature); 106 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, UnknownFeature);
102 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, DualGpuModel); 107 FRIEND_TEST_ALL_PREFIXES(GpuBlacklistTest, DualGpuModel);
103 108
104 enum BrowserVersionSupport { 109 enum BrowserVersionSupport {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 const base::DictionaryValue* value, bool top_level); 273 const base::DictionaryValue* value, bool top_level);
269 274
270 // Determines if a given os/gc/machine_model/driver is included in the 275 // Determines if a given os/gc/machine_model/driver is included in the
271 // Entry set. 276 // Entry set.
272 bool Contains(OsType os_type, 277 bool Contains(OsType os_type,
273 const Version& os_version, 278 const Version& os_version,
274 const std::string& machine_model_name, 279 const std::string& machine_model_name,
275 const Version& machine_model_version, 280 const Version& machine_model_version,
276 const content::GPUInfo& gpu_info) const; 281 const content::GPUInfo& gpu_info) const;
277 282
283 // Determines whether we needs more gpu info to make the blacklisting
284 // decision. It should only be checked if Contains() returns true.
285 bool NeedsMoreInfo(const content::GPUInfo& gpu_info) const;
286
278 // Returns the OsType. 287 // Returns the OsType.
279 OsType GetOsType() const; 288 OsType GetOsType() const;
280 289
281 // Returns the entry's unique id. 0 is reserved. 290 // Returns the entry's unique id. 0 is reserved.
282 uint32 id() const; 291 uint32 id() const;
283 292
284 // Returns whether the entry is disabled. 293 // Returns whether the entry is disabled.
285 bool disabled() const; 294 bool disabled() const;
286 295
287 // Returns the description of the entry 296 // Returns the description of the entry
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 468
460 // This records all the blacklist entries that are appliable to the current 469 // This records all the blacklist entries that are appliable to the current
461 // user machine. It is updated everytime MakeBlacklistDecision() is 470 // user machine. It is updated everytime MakeBlacklistDecision() is
462 // called and is used later by GetDecisionEntries(). 471 // called and is used later by GetDecisionEntries().
463 std::vector<ScopedGpuBlacklistEntry> active_entries_; 472 std::vector<ScopedGpuBlacklistEntry> active_entries_;
464 473
465 uint32 max_entry_id_; 474 uint32 max_entry_id_;
466 475
467 bool contains_unknown_fields_; 476 bool contains_unknown_fields_;
468 477
478 bool needs_more_info_;
479
469 std::string current_machine_model_name_; 480 std::string current_machine_model_name_;
470 scoped_ptr<Version> current_machine_model_version_; 481 scoped_ptr<Version> current_machine_model_version_;
471 482
472 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); 483 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist);
473 }; 484 };
474 485
475 #endif // CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ 486 #endif // CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_
476 487
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_blacklist.cc » ('j') | content/browser/gpu/gpu_data_manager_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698