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

Unified Diff: gpu/config/gpu_control_list.cc

Issue 1547793004: Make gpu black list work again on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clear existing gpu testing switches before each test Created 4 years, 11 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 a59d3ebd05487a44c455e3f2b149ed7e7a22ec45..ccbb621acfb7b51480a36dba15f897459a092036 100644
--- a/gpu/config/gpu_control_list.cc
+++ b/gpu/config/gpu_control_list.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "base/command_line.h"
#include "base/cpu.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
@@ -16,6 +17,7 @@
#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
#include "gpu/config/gpu_info.h"
+#include "gpu/config/gpu_switches.h"
#include "gpu/config/gpu_util.h"
#include "third_party/re2/src/re2/re2.h"
@@ -1431,6 +1433,11 @@ std::set<int> GpuControlList::MakeDecision(
if (os_version.empty())
os_version = base::SysInfo::OperatingSystemVersion();
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
Zhenyao Mo 2016/01/29 22:40:35 I disagree with this method of hacking all over th
+ if (command_line->HasSwitch(switches::kGpuTestingOsVersion))
+ os_version =
+ command_line->GetSwitchValueASCII(switches::kGpuTestingOsVersion);
+
for (size_t i = 0; i < entries_.size(); ++i) {
ScopedGpuControlListEntry entry = entries_[i];
if (entry->Contains(os, os_version, gpu_info)) {

Powered by Google App Engine
This is Rietveld 408576698