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

Side by Side Diff: gpu/config/gpu_info_collector_linux.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, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/config/gpu_info_collector_linux.h" 5 #include "gpu/config/gpu_info_collector_linux.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_piece.h" 18 #include "base/strings/string_piece.h"
18 #include "base/strings/string_split.h" 19 #include "base/strings/string_split.h"
19 #include "base/strings/string_tokenizer.h" 20 #include "base/strings/string_tokenizer.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "base/trace_event/trace_event.h" 22 #include "base/trace_event/trace_event.h"
22 #include "gpu/config/gpu_info_collector.h" 23 #include "gpu/config/gpu_info_collector.h"
23 #include "ui/gl/gl_bindings.h" 24 #include "ui/gl/gl_bindings.h"
24 #include "ui/gl/gl_context.h" 25 #include "ui/gl/gl_context.h"
25 #include "ui/gl/gl_implementation.h" 26 #include "ui/gl/gl_implementation.h"
26 #include "ui/gl/gl_surface.h" 27 #include "ui/gl/gl_surface.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 121 }
121 if (!is_gpu) 122 if (!is_gpu)
122 continue; 123 continue;
123 if (device->vendor_id == 0 || device->device_id == 0) 124 if (device->vendor_id == 0 || device->device_id == 0)
124 continue; 125 continue;
125 126
126 GPUInfo::GPUDevice gpu; 127 GPUInfo::GPUDevice gpu;
127 gpu.vendor_id = device->vendor_id; 128 gpu.vendor_id = device->vendor_id;
128 gpu.device_id = device->device_id; 129 gpu.device_id = device->device_id;
129 130
131 ParseTestingIds(&gpu.vendor_id, &gpu.device_id);
132
130 if (!primary_gpu_identified) { 133 if (!primary_gpu_identified) {
131 primary_gpu_identified = true; 134 primary_gpu_identified = true;
132 gpu_info->gpu = gpu; 135 gpu_info->gpu = gpu;
133 } else { 136 } else {
134 // TODO(zmo): if there are multiple GPUs, we assume the non Intel 137 // TODO(zmo): if there are multiple GPUs, we assume the non Intel
135 // one is primary. Revisit this logic because we actually don't know 138 // one is primary. Revisit this logic because we actually don't know
136 // which GPU we are using at this point. 139 // which GPU we are using at this point.
137 if (gpu_info->gpu.vendor_id == kVendorIDIntel && 140 if (gpu_info->gpu.vendor_id == kVendorIDIntel &&
138 gpu.vendor_id != kVendorIDIntel) { 141 gpu.vendor_id != kVendorIDIntel) {
139 gpu_info->secondary_gpus.push_back(gpu_info->gpu); 142 gpu_info->secondary_gpus.push_back(gpu_info->gpu);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 gpu_info->driver_version = driver_version; 272 gpu_info->driver_version = driver_version;
270 return kCollectInfoSuccess; 273 return kCollectInfoSuccess;
271 } 274 }
272 275
273 void MergeGPUInfo(GPUInfo* basic_gpu_info, 276 void MergeGPUInfo(GPUInfo* basic_gpu_info,
274 const GPUInfo& context_gpu_info) { 277 const GPUInfo& context_gpu_info) {
275 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 278 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
276 } 279 }
277 280
278 } // namespace gpu 281 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698