OLD | NEW |
1 // Copyright (c) 2011 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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
| 10 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "base/logging.h" | |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "base/string_piece.h" | 13 #include "base/string_piece.h" |
14 #include "base/string_split.h" | 14 #include "base/string_split.h" |
15 #include "ui/gfx/gl/gl_bindings.h" | 15 #include "ui/gl/gl_bindings.h" |
16 #include "ui/gfx/gl/gl_context.h" | 16 #include "ui/gl/gl_context.h" |
17 #include "ui/gfx/gl/gl_surface.h" | 17 #include "ui/gl/gl_surface.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 scoped_refptr<gfx::GLSurface> InitializeGLSurface() { | 21 scoped_refptr<gfx::GLSurface> InitializeGLSurface() { |
22 scoped_refptr<gfx::GLSurface> surface( | 22 scoped_refptr<gfx::GLSurface> surface( |
23 gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); | 23 gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); |
24 if (!surface.get()) { | 24 if (!surface.get()) { |
25 LOG(ERROR) << "gfx::GLContext::CreateOffscreenGLSurface failed"; | 25 LOG(ERROR) << "gfx::GLContext::CreateOffscreenGLSurface failed"; |
26 return NULL; | 26 return NULL; |
27 } | 27 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 std::string glsl_version = GetVersionFromString(glsl_version_string); | 118 std::string glsl_version = GetVersionFromString(glsl_version_string); |
119 gpu_info->pixel_shader_version = glsl_version; | 119 gpu_info->pixel_shader_version = glsl_version; |
120 gpu_info->vertex_shader_version = glsl_version; | 120 gpu_info->vertex_shader_version = glsl_version; |
121 | 121 |
122 return true; | 122 return true; |
123 } | 123 } |
124 | 124 |
125 } // namespace gpu_info_collector | 125 } // namespace gpu_info_collector |
126 | 126 |
OLD | NEW |