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 // This has to be included before windows.h. | 7 // This has to be included before windows.h. |
8 #include "third_party/re2/re2/re2.h" | 8 #include "third_party/re2/re2/re2.h" |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 // the UMA stats. Records no stats when D3D11 in not supported at all. | 353 // the UMA stats. Records no stats when D3D11 in not supported at all. |
354 void CollectD3D11Support() { | 354 void CollectD3D11Support() { |
355 // D3D11 takes about 50ms to initialize so do this on a worker thread. | 355 // D3D11 takes about 50ms to initialize so do this on a worker thread. |
356 base::WorkerPool::PostTask( | 356 base::WorkerPool::PostTask( |
357 FROM_HERE, | 357 FROM_HERE, |
358 base::Bind(CollectD3D11SupportOnWorkerThread), | 358 base::Bind(CollectD3D11SupportOnWorkerThread), |
359 false); | 359 false); |
360 } | 360 } |
361 } // namespace anonymous | 361 } // namespace anonymous |
362 | 362 |
363 #if !defined(GOOGLE_CHROME_BUILD) | 363 #if defined(GOOGLE_CHROME_BUILD) && defined(OFFICIAL_BUILD) |
| 364 // This function has a real implementation for official builds that can |
| 365 // be found in src/third_party/amd. |
| 366 void GetAMDVideocardInfo(GPUInfo* gpu_info); |
| 367 #else |
364 void GetAMDVideocardInfo(GPUInfo* gpu_info) { | 368 void GetAMDVideocardInfo(GPUInfo* gpu_info) { |
365 DCHECK(gpu_info); | 369 DCHECK(gpu_info); |
366 return; | 370 return; |
367 } | 371 } |
368 #else | |
369 // This function has a real implementation for official builds that can | |
370 // be found in src/third_party/amd. | |
371 void GetAMDVideocardInfo(GPUInfo* gpu_info); | |
372 #endif | 372 #endif |
373 | 373 |
374 bool CollectDriverInfoD3D(const std::wstring& device_id, | 374 bool CollectDriverInfoD3D(const std::wstring& device_id, |
375 GPUInfo* gpu_info) { | 375 GPUInfo* gpu_info) { |
376 TRACE_EVENT0("gpu", "CollectDriverInfoD3D"); | 376 TRACE_EVENT0("gpu", "CollectDriverInfoD3D"); |
377 | 377 |
378 // create device info for the display device | 378 // create device info for the display device |
379 HDEVINFO device_info = SetupDiGetClassDevsW( | 379 HDEVINFO device_info = SetupDiGetClassDevsW( |
380 NULL, device_id.c_str(), NULL, | 380 NULL, device_id.c_str(), NULL, |
381 DIGCF_PRESENT | DIGCF_PROFILE | DIGCF_ALLCLASSES); | 381 DIGCF_PRESENT | DIGCF_PROFILE | DIGCF_ALLCLASSES); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 basic_gpu_info->software_rendering = true; | 651 basic_gpu_info->software_rendering = true; |
652 return; | 652 return; |
653 } | 653 } |
654 | 654 |
655 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 655 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
656 | 656 |
657 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 657 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
658 } | 658 } |
659 | 659 |
660 } // namespace gpu | 660 } // namespace gpu |
OLD | NEW |