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

Unified Diff: gpu/config/gpu_info_collector.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_info_collector.cc
diff --git a/gpu/config/gpu_info_collector.cc b/gpu/config/gpu_info_collector.cc
index 44df9f1550b2b73ed58c3bc6b994130cbaca8498..a7c50feb8ad1c5742574622deebfb0e8752cd15f 100644
--- a/gpu/config/gpu_info_collector.cc
+++ b/gpu/config/gpu_info_collector.cc
@@ -10,6 +10,7 @@
#include <string>
#include <vector>
+#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/sparse_histogram.h"
@@ -18,6 +19,7 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/trace_event/trace_event.h"
+#include "gpu/config/gpu_switches.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
@@ -270,5 +272,22 @@ void IdentifyActiveGPU(GPUInfo* gpu_info) {
}
}
+void ParseTestingIds(uint32_t* vendor_id, uint32_t* device_id) {
+ DCHECK(vendor_id);
+ DCHECK(device_id);
Zhenyao Mo 2016/01/29 22:40:35 Set them to 0 by default.
+
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+
+ if (command_line->HasSwitch(switches::kGpuTestingVendorId))
+ base::HexStringToUInt(
+ command_line->GetSwitchValueASCII(switches::kGpuTestingVendorId),
+ vendor_id);
+
+ if (command_line->HasSwitch(switches::kGpuTestingDeviceId))
+ base::HexStringToUInt(
+ command_line->GetSwitchValueASCII(switches::kGpuTestingDeviceId),
+ device_id);
+}
+
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698