OLD | NEW |
1 // Copyright (c) 2012 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 "gpu/config/gpu_info_collector.h" | 5 #include "gpu/config/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/logging.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get())); | 93 scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get())); |
94 if (!context.get()) { | 94 if (!context.get()) { |
95 LOG(ERROR) << "Could not create context for info collection."; | 95 LOG(ERROR) << "Could not create context for info collection."; |
96 return kCollectInfoFatalFailure; | 96 return kCollectInfoFatalFailure; |
97 } | 97 } |
98 | 98 |
99 gpu_info->gl_renderer = GetGLString(GL_RENDERER); | 99 gpu_info->gl_renderer = GetGLString(GL_RENDERER); |
100 gpu_info->gl_vendor = GetGLString(GL_VENDOR); | 100 gpu_info->gl_vendor = GetGLString(GL_VENDOR); |
101 gpu_info->gl_extensions = GetGLString(GL_EXTENSIONS); | 101 gpu_info->gl_extensions = context->GetExtensions(); |
102 gpu_info->gl_version = GetGLString(GL_VERSION); | 102 gpu_info->gl_version = GetGLString(GL_VERSION); |
103 std::string glsl_version_string = GetGLString(GL_SHADING_LANGUAGE_VERSION); | 103 std::string glsl_version_string = GetGLString(GL_SHADING_LANGUAGE_VERSION); |
104 | 104 |
105 gfx::GLWindowSystemBindingInfo window_system_binding_info; | 105 gfx::GLWindowSystemBindingInfo window_system_binding_info; |
106 if (GetGLWindowSystemBindingInfo(&window_system_binding_info)) { | 106 if (GetGLWindowSystemBindingInfo(&window_system_binding_info)) { |
107 gpu_info->gl_ws_vendor = window_system_binding_info.vendor; | 107 gpu_info->gl_ws_vendor = window_system_binding_info.vendor; |
108 gpu_info->gl_ws_version = window_system_binding_info.version; | 108 gpu_info->gl_ws_version = window_system_binding_info.version; |
109 gpu_info->gl_ws_extensions = window_system_binding_info.extensions; | 109 gpu_info->gl_ws_extensions = window_system_binding_info.extensions; |
110 gpu_info->direct_rendering = window_system_binding_info.direct_rendering; | 110 gpu_info->direct_rendering = window_system_binding_info.direct_rendering; |
111 } | 111 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 basic_gpu_info->sandboxed = context_gpu_info.sandboxed; | 156 basic_gpu_info->sandboxed = context_gpu_info.sandboxed; |
157 basic_gpu_info->direct_rendering = context_gpu_info.direct_rendering; | 157 basic_gpu_info->direct_rendering = context_gpu_info.direct_rendering; |
158 basic_gpu_info->context_info_state = context_gpu_info.context_info_state; | 158 basic_gpu_info->context_info_state = context_gpu_info.context_info_state; |
159 basic_gpu_info->initialization_time = context_gpu_info.initialization_time; | 159 basic_gpu_info->initialization_time = context_gpu_info.initialization_time; |
160 basic_gpu_info->video_encode_accelerator_supported_profiles = | 160 basic_gpu_info->video_encode_accelerator_supported_profiles = |
161 context_gpu_info.video_encode_accelerator_supported_profiles; | 161 context_gpu_info.video_encode_accelerator_supported_profiles; |
162 } | 162 } |
163 | 163 |
164 } // namespace gpu | 164 } // namespace gpu |
165 | 165 |
OLD | NEW |