| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 return; | 205 return; |
| 206 | 206 |
| 207 // Creating a D3D11 device when DisplayLink is installed causes D3D11 to | 207 // Creating a D3D11 device when DisplayLink is installed causes D3D11 to |
| 208 // crash. | 208 // crash. |
| 209 if (GetModuleHandle(L"dlumd32.dll")) | 209 if (GetModuleHandle(L"dlumd32.dll")) |
| 210 return; | 210 return; |
| 211 | 211 |
| 212 FeatureLevel feature_level = FEATURE_LEVEL_UNKNOWN; | 212 FeatureLevel feature_level = FEATURE_LEVEL_UNKNOWN; |
| 213 UINT bgra_support = 0; | 213 UINT bgra_support = 0; |
| 214 | 214 |
| 215 base::ScopedNativeLibrary module(FilePath(L"d3d11.dll")); | 215 base::ScopedNativeLibrary module(base::FilePath(L"d3d11.dll")); |
| 216 if (!module.is_valid()) { | 216 if (!module.is_valid()) { |
| 217 feature_level = FEATURE_LEVEL_NO_D3D11_DLL; | 217 feature_level = FEATURE_LEVEL_NO_D3D11_DLL; |
| 218 } else { | 218 } else { |
| 219 D3D11CreateDeviceFunc create_func = | 219 D3D11CreateDeviceFunc create_func = |
| 220 reinterpret_cast<D3D11CreateDeviceFunc>( | 220 reinterpret_cast<D3D11CreateDeviceFunc>( |
| 221 module.GetFunctionPointer("D3D11CreateDevice")); | 221 module.GetFunctionPointer("D3D11CreateDevice")); |
| 222 if (!create_func) { | 222 if (!create_func) { |
| 223 feature_level = FEATURE_LEVEL_NO_CREATE_DEVICE_ENTRY_POINT; | 223 feature_level = FEATURE_LEVEL_NO_CREATE_DEVICE_ENTRY_POINT; |
| 224 } else { | 224 } else { |
| 225 static const D3D_FEATURE_LEVEL d3d_feature_levels[] = { | 225 static const D3D_FEATURE_LEVEL d3d_feature_levels[] = { |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 basic_gpu_info->software_rendering = true; | 523 basic_gpu_info->software_rendering = true; |
| 524 return; | 524 return; |
| 525 } | 525 } |
| 526 | 526 |
| 527 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 527 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
| 528 | 528 |
| 529 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 529 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace gpu_info_collector | 532 } // namespace gpu_info_collector |
| OLD | NEW |