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

Unified Diff: gpu/config/gpu_control_list.cc

Issue 23703017: Enable GPU control lists in tests on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r228383 Created 7 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 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 1d45d726614e48fbebb69217c5a765189938f93e..0c645b5c9564cadbdb841a095e8ba6e128b0fc37 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"
@@ -1030,6 +1031,14 @@ GpuControlList::GpuControlListEntry::StringToMultiGpuCategory(
return kMultiGpuCategoryNone;
}
+void GpuControlList::GpuControlListEntry::LogControlListMatch(
+ const std::string& control_list_logging_name) const {
+ static const char kControlListMatchMessage[] =
+ "Control list match for rule #%u in %s.";
+ LOG(INFO) << base::StringPrintf(kControlListMatchMessage, id_,
+ control_list_logging_name.c_str());
+}
+
bool GpuControlList::GpuControlListEntry::Contains(
OsType os_type, const std::string& os_version,
const GPUInfo& gpu_info) const {
@@ -1185,7 +1194,8 @@ bool GpuControlList::GpuControlListEntry::StringToFeature(
GpuControlList::GpuControlList()
: max_entry_id_(0),
needs_more_info_(false),
- supports_feature_type_all_(false) {
+ supports_feature_type_all_(false),
+ control_list_logging_enabled_(false) {
}
GpuControlList::~GpuControlList() {
@@ -1292,6 +1302,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 (control_list_logging_enabled_)
+ entries_[i]->LogControlListMatch(control_list_logging_name_);
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