OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/gfx/gl/gl_bindings.h" | |
11 #include "app/gfx/gl/gl_context.h" | |
12 #include "app/gfx/gl/gl_implementation.h" | |
13 #include "base/file_util.h" | 10 #include "base/file_util.h" |
14 #include "base/logging.h" | 11 #include "base/logging.h" |
15 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
16 #include "base/string_piece.h" | 13 #include "base/string_piece.h" |
17 #include "base/string_split.h" | 14 #include "base/string_split.h" |
18 #include "base/string_tokenizer.h" | 15 #include "base/string_tokenizer.h" |
19 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "ui/gfx/gl/gl_bindings.h" |
| 18 #include "ui/gfx/gl/gl_context.h" |
| 19 #include "ui/gfx/gl/gl_implementation.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // PciDevice and PciAccess are defined to access libpci functions. Their | 23 // PciDevice and PciAccess are defined to access libpci functions. Their |
24 // members match the corresponding structures defined by libpci in size up to | 24 // members match the corresponding structures defined by libpci in size up to |
25 // fields we may access. For those members we don't use, their names are | 25 // fields we may access. For those members we don't use, their names are |
26 // defined as "fieldX", etc., or, left out if they are declared after the | 26 // defined as "fieldX", etc., or, left out if they are declared after the |
27 // members we care about in libpci. | 27 // members we care about in libpci. |
28 | 28 |
29 struct PciDevice { | 29 struct PciDevice { |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 return false; | 302 return false; |
303 if (pos != std::string::npos) | 303 if (pos != std::string::npos) |
304 driver_version = driver_version.substr(0, pos); | 304 driver_version = driver_version.substr(0, pos); |
305 | 305 |
306 gpu_info->driver_vendor = pieces[1]; | 306 gpu_info->driver_vendor = pieces[1]; |
307 gpu_info->driver_version = driver_version; | 307 gpu_info->driver_version = driver_version; |
308 return true; | 308 return true; |
309 } | 309 } |
310 | 310 |
311 } // namespace gpu_info_collector | 311 } // namespace gpu_info_collector |
OLD | NEW |