| 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> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 namespace gpu { | 264 namespace gpu { |
| 265 | 265 |
| 266 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { | 266 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { |
| 267 /// TODO(tobiasjs) Check if CollectGraphicsInfo in gpu_main.cc | 267 /// TODO(tobiasjs) Check if CollectGraphicsInfo in gpu_main.cc |
| 268 /// really only needs basic graphics info on all platforms, and if | 268 /// really only needs basic graphics info on all platforms, and if |
| 269 /// so switch it to using that and make this the NOP that it really | 269 /// so switch it to using that and make this the NOP that it really |
| 270 /// should be, to avoid potential double collection of info. | 270 /// should be, to avoid potential double collection of info. |
| 271 return CollectBasicGraphicsInfo(gpu_info); | 271 return CollectBasicGraphicsInfo(gpu_info); |
| 272 } | 272 } |
| 273 | 273 |
| 274 CollectInfoResult CollectGpuID(uint32_t* vendor_id, uint32_t* device_id) { | |
| 275 DCHECK(vendor_id && device_id); | |
| 276 *vendor_id = 0; | |
| 277 *device_id = 0; | |
| 278 return kCollectInfoNonFatalFailure; | |
| 279 } | |
| 280 | |
| 281 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { | 274 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { |
| 282 // When command buffer is compiled as a standalone library, the process might | 275 // When command buffer is compiled as a standalone library, the process might |
| 283 // not have a Java environment. | 276 // not have a Java environment. |
| 284 if (base::android::IsVMInitialized()) { | 277 if (base::android::IsVMInitialized()) { |
| 285 gpu_info->machine_model_name = | 278 gpu_info->machine_model_name = |
| 286 base::android::BuildInfo::GetInstance()->model(); | 279 base::android::BuildInfo::GetInstance()->model(); |
| 287 } | 280 } |
| 288 | 281 |
| 289 // Create a short-lived context on the UI thread to collect the GL strings. | 282 // Create a short-lived context on the UI thread to collect the GL strings. |
| 290 // Make sure we restore the existing context if there is one. | 283 // Make sure we restore the existing context if there is one. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 303 gpu_info->gpu.device_string = gpu_info->gl_renderer; | 296 gpu_info->gpu.device_string = gpu_info->gl_renderer; |
| 304 return kCollectInfoSuccess; | 297 return kCollectInfoSuccess; |
| 305 } | 298 } |
| 306 | 299 |
| 307 void MergeGPUInfo(GPUInfo* basic_gpu_info, | 300 void MergeGPUInfo(GPUInfo* basic_gpu_info, |
| 308 const GPUInfo& context_gpu_info) { | 301 const GPUInfo& context_gpu_info) { |
| 309 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 302 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
| 310 } | 303 } |
| 311 | 304 |
| 312 } // namespace gpu | 305 } // namespace gpu |
| OLD | NEW |