| Index: content/browser/gpu/gpu_blacklist.cc
|
| ===================================================================
|
| --- content/browser/gpu/gpu_blacklist.cc (revision 102158)
|
| +++ content/browser/gpu/gpu_blacklist.cc (working copy)
|
| @@ -223,6 +223,12 @@
|
| return NULL;
|
| }
|
| dictionary_entry_count++;
|
| +
|
| + bool disabled;
|
| + if (value->GetBoolean("disabled", &disabled)) {
|
| + entry->SetDisabled(disabled);
|
| + dictionary_entry_count++;
|
| + }
|
| }
|
|
|
| std::string description;
|
| @@ -456,6 +462,7 @@
|
|
|
| GpuBlacklist::GpuBlacklistEntry::GpuBlacklistEntry()
|
| : id_(0),
|
| + disabled_(false),
|
| vendor_id_(0),
|
| contains_unknown_fields_(false),
|
| contains_unknown_features_(false) {
|
| @@ -469,6 +476,10 @@
|
| return false;
|
| }
|
|
|
| +void GpuBlacklist::GpuBlacklistEntry::SetDisabled(bool disabled) {
|
| + disabled_ = disabled;
|
| +}
|
| +
|
| bool GpuBlacklist::GpuBlacklistEntry::SetOsInfo(
|
| const std::string& os,
|
| const std::string& version_op,
|
| @@ -644,6 +655,10 @@
|
| return id_;
|
| }
|
|
|
| +bool GpuBlacklist::GpuBlacklistEntry::disabled() const {
|
| + return disabled_;
|
| +}
|
| +
|
| GpuFeatureFlags GpuBlacklist::GpuBlacklistEntry::GetGpuFeatureFlags() const {
|
| return *feature_flags_;
|
| }
|
| @@ -752,7 +767,8 @@
|
|
|
| for (size_t i = 0; i < blacklist_.size(); ++i) {
|
| if (blacklist_[i]->Contains(os, *os_version, browser_channel_, gpu_info)) {
|
| - flags.Combine(blacklist_[i]->GetGpuFeatureFlags());
|
| + if (!blacklist_[i]->disabled())
|
| + flags.Combine(blacklist_[i]->GetGpuFeatureFlags());
|
| active_entries_.push_back(blacklist_[i]);
|
| }
|
| }
|
| @@ -761,10 +777,12 @@
|
|
|
| void GpuBlacklist::GetGpuFeatureFlagEntries(
|
| GpuFeatureFlags::GpuFeatureType feature,
|
| - std::vector<uint32>& entry_ids) const {
|
| + std::vector<uint32>& entry_ids,
|
| + bool disabled) const {
|
| entry_ids.clear();
|
| for (size_t i = 0; i < active_entries_.size(); ++i) {
|
| - if ((feature & active_entries_[i]->GetGpuFeatureFlags().flags()) != 0)
|
| + if (((feature & active_entries_[i]->GetGpuFeatureFlags().flags()) != 0) &&
|
| + disabled == active_entries_[i]->disabled())
|
| entry_ids.push_back(active_entries_[i]->id());
|
| }
|
| }
|
|
|