Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: content/gpu/gpu_info_collector_mac.mm

Issue 6684015: Move chrome\gpu to content\gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/gpu/gpu_info_collector_linux.cc ('k') | content/gpu/gpu_info_collector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2010 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 "chrome/gpu/gpu_info_collector.h" 5 #include "content/gpu/gpu_info_collector.h"
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"
6 #include "base/logging.h" 11 #include "base/logging.h"
7 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
8 #include "base/string_piece.h" 13 #include "base/string_piece.h"
9 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
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 "app/gfx/gl/gl_interface.h"
14 15
15 #import <Cocoa/Cocoa.h> 16 #import <Cocoa/Cocoa.h>
16 #import <Foundation/Foundation.h> 17 #import <Foundation/Foundation.h>
17 #import <IOKit/IOKitLib.h> 18 #import <IOKit/IOKitLib.h>
18 19
19 namespace { 20 namespace {
20 21
21 CFTypeRef SearchPortForProperty(io_registry_entry_t dspPort, 22 CFTypeRef SearchPortForProperty(io_registry_entry_t dspPort,
22 CFStringRef propertyName) { 23 CFStringRef propertyName) {
23 return IORegistryEntrySearchCFProperty(dspPort, 24 return IORegistryEntrySearchCFProperty(dspPort,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Use some jiggery-pokery to turn that utf8 string into a std::wstring. 95 // Use some jiggery-pokery to turn that utf8 string into a std::wstring.
95 std::string gl_version_string = gpu_info->gl_version_string; 96 std::string gl_version_string = gpu_info->gl_version_string;
96 size_t pos = gl_version_string.find_last_of('-'); 97 size_t pos = gl_version_string.find_last_of('-');
97 if (pos == std::string::npos) 98 if (pos == std::string::npos)
98 return false; 99 return false;
99 gpu_info->driver_version = gl_version_string.substr(pos + 1); 100 gpu_info->driver_version = gl_version_string.substr(pos + 1);
100 return true; 101 return true;
101 } 102 }
102 103
103 } // namespace gpu_info_collector 104 } // namespace gpu_info_collector
OLDNEW
« no previous file with comments | « content/gpu/gpu_info_collector_linux.cc ('k') | content/gpu/gpu_info_collector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698