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

Unified Diff: gpu/config/gpu_control_list.cc

Issue 23534006: Enable GPU blacklist in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Introduce GpuControlListEntry::LogBlacklistMatch() and fix some GpuFeatureTests. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: gpu/config/gpu_control_list.cc
diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc
index 5eb09c489f166345f9c8d3f5e3eabc206f5a86dd..9548884ca6dd14fea413811e68abd32e4ab47665 100644
--- a/gpu/config/gpu_control_list.cc
+++ b/gpu/config/gpu_control_list.cc
@@ -10,6 +10,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
+#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
#include "gpu/config/gpu_info.h"
#include "gpu/config/gpu_util.h"
@@ -1036,6 +1037,12 @@ GpuControlList::GpuControlListEntry::StringToMultiGpuCategory(
return kMultiGpuCategoryNone;
}
+void GpuControlList::GpuControlListEntry::LogBlacklistMatch() const {
+ static const char kDisabledFeaturesMessage[] =
+ "Blacklist match for rule #%u.";
+ LOG(INFO) << base::StringPrintf(kDisabledFeaturesMessage, id_);
gab 2013/08/27 22:24:12 Used this to debug locally and via try jobs along
Zhenyao Mo 2013/08/27 22:50:41 Use LogControlListMatch() instead and also the mes
gab 2013/08/28 20:20:39 Done.
+}
+
bool GpuControlList::GpuControlListEntry::Contains(
OsType os_type, const std::string& os_version,
const GPUInfo& gpu_info) const {
@@ -1189,7 +1196,8 @@ bool GpuControlList::GpuControlListEntry::StringToFeature(
}
GpuControlList::GpuControlList()
- : max_entry_id_(0),
+ : blacklist_logging_enabled_(false),
+ max_entry_id_(0),
contains_unknown_fields_(false),
needs_more_info_(false),
supports_feature_type_all_(false) {
@@ -1309,6 +1317,8 @@ std::set<int> GpuControlList::MakeDecision(
for (size_t i = 0; i < entries_.size(); ++i) {
if (entries_[i]->Contains(os, os_version, gpu_info)) {
if (!entries_[i]->disabled()) {
+ if (blacklist_logging_enabled_)
Zhenyao Mo 2013/08/27 22:50:41 same, control_list_logging_enabled_ instead.
gab 2013/08/28 20:20:39 Done.
+ entries_[i]->LogBlacklistMatch();
MergeFeatureSets(&possible_features, entries_[i]->features());
if (!entries_[i]->NeedsMoreInfo(gpu_info))
MergeFeatureSets(&features, entries_[i]->features());

Powered by Google App Engine
This is Rietveld 408576698