OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "gpu/config/gpu_info_collector.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
8 #include "base/command_line.h" | 11 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 13 #include "base/logging.h" |
11 #include "base/native_library.h" | 14 #include "base/native_library.h" |
12 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
14 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
15 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
16 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 namespace gpu { | 248 namespace gpu { |
246 | 249 |
247 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { | 250 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { |
248 /// TODO(tobiasjs) Check if CollectGraphicsInfo in gpu_main.cc | 251 /// TODO(tobiasjs) Check if CollectGraphicsInfo in gpu_main.cc |
249 /// really only needs basic graphics info on all platforms, and if | 252 /// really only needs basic graphics info on all platforms, and if |
250 /// so switch it to using that and make this the NOP that it really | 253 /// so switch it to using that and make this the NOP that it really |
251 /// should be, to avoid potential double collection of info. | 254 /// should be, to avoid potential double collection of info. |
252 return CollectBasicGraphicsInfo(gpu_info); | 255 return CollectBasicGraphicsInfo(gpu_info); |
253 } | 256 } |
254 | 257 |
255 CollectInfoResult CollectGpuID(uint32* vendor_id, uint32* device_id) { | 258 CollectInfoResult CollectGpuID(uint32_t* vendor_id, uint32_t* device_id) { |
256 DCHECK(vendor_id && device_id); | 259 DCHECK(vendor_id && device_id); |
257 *vendor_id = 0; | 260 *vendor_id = 0; |
258 *device_id = 0; | 261 *device_id = 0; |
259 return kCollectInfoNonFatalFailure; | 262 return kCollectInfoNonFatalFailure; |
260 } | 263 } |
261 | 264 |
262 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { | 265 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { |
263 gpu_info->can_lose_context = false; | 266 gpu_info->can_lose_context = false; |
264 | 267 |
265 gpu_info->machine_model_name = | 268 gpu_info->machine_model_name = |
(...skipping 16 matching lines...) Expand all Loading... |
282 gpu_info->gpu.device_string = gpu_info->gl_renderer; | 285 gpu_info->gpu.device_string = gpu_info->gl_renderer; |
283 return kCollectInfoSuccess; | 286 return kCollectInfoSuccess; |
284 } | 287 } |
285 | 288 |
286 void MergeGPUInfo(GPUInfo* basic_gpu_info, | 289 void MergeGPUInfo(GPUInfo* basic_gpu_info, |
287 const GPUInfo& context_gpu_info) { | 290 const GPUInfo& context_gpu_info) { |
288 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 291 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
289 } | 292 } |
290 | 293 |
291 } // namespace gpu | 294 } // namespace gpu |
OLD | NEW |