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

Side by Side Diff: content/gpu/gpu_info_collector_win.cc

Issue 7048007: Move scoped_temp_dir and scoped_native_library back from base/memory to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unknwn Created 9 years, 7 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
OLDNEW
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 <windows.h>
7 #include <d3d9.h> 8 #include <d3d9.h>
8 #include <setupapi.h> 9 #include <setupapi.h>
9 #include <windows.h>
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/scoped_native_library.h" 13 #include "base/scoped_native_library.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "ui/gfx/gl/gl_implementation.h" 16 #include "ui/gfx/gl/gl_implementation.h"
17 #include "ui/gfx/gl/gl_surface_egl.h" 17 #include "ui/gfx/gl/gl_surface_egl.h"
18 18
19 // ANGLE seems to require that main.h be included before any other ANGLE header. 19 // ANGLE seems to require that main.h be included before any other ANGLE header.
20 #include "libEGL/Display.h"
20 #include "libEGL/main.h" 21 #include "libEGL/main.h"
21 #include "libEGL/Display.h"
22 22
23 namespace { 23 namespace {
24 24
25 // The version number stores the major and minor version in the least 16 bits; 25 // The version number stores the major and minor version in the least 16 bits;
26 // for example, 2.5 is 0x00000205. 26 // for example, 2.5 is 0x00000205.
27 // Returned string is in the format of "major.minor". 27 // Returned string is in the format of "major.minor".
28 std::string VersionNumberToString(uint32 version_number) { 28 std::string VersionNumberToString(uint32 version_number) {
29 int hi = (version_number >> 8) & 0xff; 29 int hi = (version_number >> 8) & 0xff;
30 int low = version_number & 0xff; 30 int low = version_number & 0xff;
31 return base::IntToString(hi) + "." + base::IntToString(low); 31 return base::IntToString(hi) + "." + base::IntToString(low);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 size_t pos = gl_version_string.find_last_not_of("0123456789."); 266 size_t pos = gl_version_string.find_last_not_of("0123456789.");
267 if (pos != std::string::npos && pos < gl_version_string.length() - 1) { 267 if (pos != std::string::npos && pos < gl_version_string.length() - 1) {
268 gpu_info->driver_version = gl_version_string.substr(pos + 1); 268 gpu_info->driver_version = gl_version_string.substr(pos + 1);
269 return true; 269 return true;
270 } 270 }
271 return false; 271 return false;
272 } 272 }
273 273
274 } // namespace gpu_info_collector 274 } // namespace gpu_info_collector
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_browsertest.cc ('k') | content/ppapi_plugin/ppapi_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698