| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 return false; | 203 return false; |
| 204 | 204 |
| 205 return true; | 205 return true; |
| 206 } | 206 } |
| 207 | 207 |
| 208 // Determines whether D3D11 won't work, either because it is not supported on | 208 // Determines whether D3D11 won't work, either because it is not supported on |
| 209 // the machine or because it is known it is likely to crash. | 209 // the machine or because it is known it is likely to crash. |
| 210 bool D3D11ShouldWork(const GPUInfo& gpu_info) { | 210 bool D3D11ShouldWork(const GPUInfo& gpu_info) { |
| 211 // TODO(apatrick): This is a temporary change to see what impact disabling | 211 // TODO(apatrick): This is a temporary change to see what impact disabling |
| 212 // D3D11 stats collection has on Canary. | 212 // D3D11 stats collection has on Canary. |
| 213 #if 1 |
| 213 return false; | 214 return false; |
| 214 | 215 #else |
| 215 // Windows XP never supports D3D11. It seems to be less stable that D3D9 on | 216 // Windows XP never supports D3D11. It seems to be less stable that D3D9 on |
| 216 // Vista. | 217 // Vista. |
| 217 if (base::win::GetVersion() <= base::win::VERSION_VISTA) | 218 if (base::win::GetVersion() <= base::win::VERSION_VISTA) |
| 218 return false; | 219 return false; |
| 219 | 220 |
| 220 // http://crbug.com/175525. | 221 // http://crbug.com/175525. |
| 221 if (gpu_info.display_link_version.IsValid()) | 222 if (gpu_info.display_link_version.IsValid()) |
| 222 return false; | 223 return false; |
| 223 | 224 |
| 224 return true; | 225 return true; |
| 226 #endif |
| 225 } | 227 } |
| 226 | 228 |
| 227 // Collects information about the level of D3D11 support and records it in | 229 // Collects information about the level of D3D11 support and records it in |
| 228 // the UMA stats. Records no stats when D3D11 in not supported at all. | 230 // the UMA stats. Records no stats when D3D11 in not supported at all. |
| 229 void CollectD3D11SupportOnWorkerThread() { | 231 void CollectD3D11SupportOnWorkerThread() { |
| 230 TRACE_EVENT0("gpu", "CollectD3D11Support"); | 232 TRACE_EVENT0("gpu", "CollectD3D11Support"); |
| 231 | 233 |
| 232 typedef HRESULT (WINAPI *D3D11CreateDeviceFunc)( | 234 typedef HRESULT (WINAPI *D3D11CreateDeviceFunc)( |
| 233 IDXGIAdapter* adapter, | 235 IDXGIAdapter* adapter, |
| 234 D3D_DRIVER_TYPE driver_type, | 236 D3D_DRIVER_TYPE driver_type, |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 basic_gpu_info->software_rendering = true; | 646 basic_gpu_info->software_rendering = true; |
| 645 return; | 647 return; |
| 646 } | 648 } |
| 647 | 649 |
| 648 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 650 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
| 649 | 651 |
| 650 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 652 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
| 651 } | 653 } |
| 652 | 654 |
| 653 } // namespace gpu | 655 } // namespace gpu |
| OLD | NEW |