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 #include <windows.h> | 7 #include <windows.h> |
8 #include <d3d9.h> | 8 #include <d3d9.h> |
9 #include <setupapi.h> | 9 #include <setupapi.h> |
10 #include <winsatcominterfacei.h> | 10 #include <winsatcominterfacei.h> |
11 | 11 |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/scoped_native_library.h" | 15 #include "base/scoped_native_library.h" |
16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "base/win/scoped_com_initializer.h" | 18 #include "base/win/scoped_com_initializer.h" |
19 #include "base/win/scoped_comptr.h" | 19 #include "base/win/scoped_comptr.h" |
20 #include "ui/gfx/gl/gl_implementation.h" | 20 #include "ui/gl/gl_implementation.h" |
21 #include "ui/gfx/gl/gl_surface_egl.h" | 21 #include "ui/gl/gl_surface_egl.h" |
22 | 22 |
23 // ANGLE seems to require that main.h be included before any other ANGLE header. | 23 // ANGLE seems to require that main.h be included before any other ANGLE header. |
24 #include "libEGL/Display.h" | 24 #include "libEGL/Display.h" |
25 #include "libEGL/main.h" | 25 #include "libEGL/main.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // The version number stores the major and minor version in the least 16 bits; | 29 // The version number stores the major and minor version in the least 16 bits; |
30 // for example, 2.5 is 0x00000205. | 30 // for example, 2.5 is 0x00000205. |
31 // Returned string is in the format of "major.minor". | 31 // Returned string is in the format of "major.minor". |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 size_t pos = gl_version_string.find_last_not_of("0123456789."); | 312 size_t pos = gl_version_string.find_last_not_of("0123456789."); |
313 if (pos != std::string::npos && pos < gl_version_string.length() - 1) { | 313 if (pos != std::string::npos && pos < gl_version_string.length() - 1) { |
314 gpu_info->driver_version = gl_version_string.substr(pos + 1); | 314 gpu_info->driver_version = gl_version_string.substr(pos + 1); |
315 return true; | 315 return true; |
316 } | 316 } |
317 return false; | 317 return false; |
318 } | 318 } |
319 | 319 |
320 } // namespace gpu_info_collector | 320 } // namespace gpu_info_collector |
OLD | NEW |