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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.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: content/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index ba24d269dcec9244c788bfa2beb9cb90f1011ddd..a543f7c59578b4a4bf683c6eefbfd6e409efc65d 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -484,7 +484,11 @@ void GpuDataManagerImplPrivate::SetGLStrings(const std::string& gl_vendor,
gpu_info.gl_version = gl_version;
gpu::IdentifyActiveGPU(&gpu_info);
- gpu::CollectDriverInfoGL(&gpu_info);
+
+ // Give a chance to IsEssentialGpuInfoAvailable() to return true. Useful
+ // to prevent launching the gpu process from SystemInfoHandler::GetInfo
+ // from DevToolsHttpHandler when running python browser tests.
+ gpu_info.context_info_state = gpu::CollectDriverInfoGL(&gpu_info);
UpdateGpuInfo(gpu_info);
UpdateGpuSwitchingManager(gpu_info);
@@ -530,6 +534,13 @@ void GpuDataManagerImplPrivate::Initialize() {
TRACE_EVENT0("startup",
"GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
gpu::CollectBasicGraphicsInfo(&gpu_info);
+
+ // Always active the testing gpu device if any.
+ uint32_t vendor_id = 0;
+ uint32_t device_id = 0;
+ gpu::ParseTestingIds(&vendor_id, &device_id);
+ gpu_info.gpu.active = gpu_info.gpu.vendor_id == vendor_id &&
+ gpu_info.gpu.device_id == device_id;
}
#if defined(ARCH_CPU_X86_FAMILY)
if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id) {

Powered by Google App Engine
This is Rietveld 408576698