| 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 "content/gpu/gpu_info_collector.h" | 5 #include "content/gpu/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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 FEATURE_LEVEL_10_0, | 197 FEATURE_LEVEL_10_0, |
| 198 FEATURE_LEVEL_10_1, | 198 FEATURE_LEVEL_10_1, |
| 199 FEATURE_LEVEL_11_0, | 199 FEATURE_LEVEL_11_0, |
| 200 NUM_FEATURE_LEVELS | 200 NUM_FEATURE_LEVELS |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 // Windows XP is expected to not support D3D11. | 203 // Windows XP is expected to not support D3D11. |
| 204 if (base::win::GetVersion() <= base::win::VERSION_XP) | 204 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 205 return; | 205 return; |
| 206 | 206 |
| 207 // Creating a D3D11 device when DisplayLink is installed causes D3D11 to |
| 208 // crash. |
| 209 if (GetModuleHandle(L"dlumd32.dll")) |
| 210 return; |
| 211 |
| 207 FeatureLevel feature_level = FEATURE_LEVEL_UNKNOWN; | 212 FeatureLevel feature_level = FEATURE_LEVEL_UNKNOWN; |
| 208 UINT bgra_support = 0; | 213 UINT bgra_support = 0; |
| 209 | 214 |
| 210 base::ScopedNativeLibrary module(FilePath(L"d3d11.dll")); | 215 base::ScopedNativeLibrary module(FilePath(L"d3d11.dll")); |
| 211 if (!module.is_valid()) { | 216 if (!module.is_valid()) { |
| 212 feature_level = FEATURE_LEVEL_NO_D3D11_DLL; | 217 feature_level = FEATURE_LEVEL_NO_D3D11_DLL; |
| 213 } else { | 218 } else { |
| 214 D3D11CreateDeviceFunc create_func = | 219 D3D11CreateDeviceFunc create_func = |
| 215 reinterpret_cast<D3D11CreateDeviceFunc>( | 220 reinterpret_cast<D3D11CreateDeviceFunc>( |
| 216 module.GetFunctionPointer("D3D11CreateDevice")); | 221 module.GetFunctionPointer("D3D11CreateDevice")); |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 basic_gpu_info->software_rendering = true; | 517 basic_gpu_info->software_rendering = true; |
| 513 return; | 518 return; |
| 514 } | 519 } |
| 515 | 520 |
| 516 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 521 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
| 517 | 522 |
| 518 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 523 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
| 519 } | 524 } |
| 520 | 525 |
| 521 } // namespace gpu_info_collector | 526 } // namespace gpu_info_collector |
| OLD | NEW |