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 <string> | 7 #include <string> |
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 "base/logging.h" | 10 #include "base/logging.h" |
13 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
14 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
15 #include "base/string_split.h" | 13 #include "base/string_split.h" |
| 14 #include "ui/gfx/gl/gl_bindings.h" |
| 15 #include "ui/gfx/gl/gl_context.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // This creates an offscreen GL context for gl queries. Returned GLContext | 19 // This creates an offscreen GL context for gl queries. Returned GLContext |
20 // should be deleted in FinalizeGLContext. | 20 // should be deleted in FinalizeGLContext. |
21 gfx::GLContext* InitializeGLContext() { | 21 gfx::GLContext* InitializeGLContext() { |
22 if (!gfx::GLContext::InitializeOneOff()) { | 22 if (!gfx::GLContext::InitializeOneOff()) { |
23 LOG(ERROR) << "gfx::GLContext::InitializeOneOff() failed"; | 23 LOG(ERROR) << "gfx::GLContext::InitializeOneOff() failed"; |
24 return NULL; | 24 return NULL; |
25 } | 25 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 std::string glsl_version = GetVersionFromString(glsl_version_string); | 110 std::string glsl_version = GetVersionFromString(glsl_version_string); |
111 gpu_info->pixel_shader_version = glsl_version; | 111 gpu_info->pixel_shader_version = glsl_version; |
112 gpu_info->vertex_shader_version = glsl_version; | 112 gpu_info->vertex_shader_version = glsl_version; |
113 | 113 |
114 return true; | 114 return true; |
115 } | 115 } |
116 | 116 |
117 } // namespace gpu_info_collector | 117 } // namespace gpu_info_collector |
118 | 118 |
OLD | NEW |