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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 272 } |
273 | 273 |
274 CollectInfoResult CollectGpuID(uint32_t* vendor_id, uint32_t* device_id) { | 274 CollectInfoResult CollectGpuID(uint32_t* vendor_id, uint32_t* device_id) { |
275 DCHECK(vendor_id && device_id); | 275 DCHECK(vendor_id && device_id); |
276 *vendor_id = 0; | 276 *vendor_id = 0; |
277 *device_id = 0; | 277 *device_id = 0; |
278 return kCollectInfoNonFatalFailure; | 278 return kCollectInfoNonFatalFailure; |
279 } | 279 } |
280 | 280 |
281 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { | 281 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { |
282 gpu_info->can_lose_context = false; | |
283 | |
284 // When command buffer is compiled as a standalone library, the process might | 282 // When command buffer is compiled as a standalone library, the process might |
285 // not have a Java environment. | 283 // not have a Java environment. |
286 if (base::android::IsVMInitialized()) { | 284 if (base::android::IsVMInitialized()) { |
287 gpu_info->machine_model_name = | 285 gpu_info->machine_model_name = |
288 base::android::BuildInfo::GetInstance()->model(); | 286 base::android::BuildInfo::GetInstance()->model(); |
289 } | 287 } |
290 | 288 |
291 // Create a short-lived context on the UI thread to collect the GL strings. | 289 // Create a short-lived context on the UI thread to collect the GL strings. |
292 // Make sure we restore the existing context if there is one. | 290 // Make sure we restore the existing context if there is one. |
293 CollectInfoResult result = CollectDriverInfo(gpu_info); | 291 CollectInfoResult result = CollectDriverInfo(gpu_info); |
(...skipping 11 matching lines...) Expand all Loading... |
305 gpu_info->gpu.device_string = gpu_info->gl_renderer; | 303 gpu_info->gpu.device_string = gpu_info->gl_renderer; |
306 return kCollectInfoSuccess; | 304 return kCollectInfoSuccess; |
307 } | 305 } |
308 | 306 |
309 void MergeGPUInfo(GPUInfo* basic_gpu_info, | 307 void MergeGPUInfo(GPUInfo* basic_gpu_info, |
310 const GPUInfo& context_gpu_info) { | 308 const GPUInfo& context_gpu_info) { |
311 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 309 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
312 } | 310 } |
313 | 311 |
314 } // namespace gpu | 312 } // namespace gpu |
OLD | NEW |