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 "app/gfx/gl/gl_bindings.h" | |
8 #include "app/gfx/gl/gl_context.h" | |
9 #include "app/gfx/gl/gl_implementation.h" | |
10 #include "app/gfx/gl/gl_interface.h" | |
11 #include "base/logging.h" | 7 #include "base/logging.h" |
12 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
13 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
14 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #include "ui/gfx/gl/gl_bindings.h" |
| 12 #include "ui/gfx/gl/gl_context.h" |
| 13 #include "ui/gfx/gl/gl_implementation.h" |
| 14 #include "ui/gfx/gl/gl_interface.h" |
15 | 15 |
16 #import <Cocoa/Cocoa.h> | 16 #import <Cocoa/Cocoa.h> |
17 #import <Foundation/Foundation.h> | 17 #import <Foundation/Foundation.h> |
18 #import <IOKit/IOKitLib.h> | 18 #import <IOKit/IOKitLib.h> |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 CFTypeRef SearchPortForProperty(io_registry_entry_t dspPort, | 22 CFTypeRef SearchPortForProperty(io_registry_entry_t dspPort, |
23 CFStringRef propertyName) { | 23 CFStringRef propertyName) { |
24 return IORegistryEntrySearchCFProperty(dspPort, | 24 return IORegistryEntrySearchCFProperty(dspPort, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Use some jiggery-pokery to turn that utf8 string into a std::wstring. | 93 // Use some jiggery-pokery to turn that utf8 string into a std::wstring. |
94 std::string gl_version_string = gpu_info->gl_version_string; | 94 std::string gl_version_string = gpu_info->gl_version_string; |
95 size_t pos = gl_version_string.find_last_of('-'); | 95 size_t pos = gl_version_string.find_last_of('-'); |
96 if (pos == std::string::npos) | 96 if (pos == std::string::npos) |
97 return false; | 97 return false; |
98 gpu_info->driver_version = gl_version_string.substr(pos + 1); | 98 gpu_info->driver_version = gl_version_string.substr(pos + 1); |
99 return true; | 99 return true; |
100 } | 100 } |
101 | 101 |
102 } // namespace gpu_info_collector | 102 } // namespace gpu_info_collector |
OLD | NEW |