| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| 112 | 112 |
| 113 bool supports_robustness = | 113 bool supports_robustness = |
| 114 gpu_info->gl_extensions.find("GL_EXT_robustness") != std::string::npos || | 114 gpu_info->gl_extensions.find("GL_EXT_robustness") != std::string::npos || |
| 115 gpu_info->gl_extensions.find("GL_KHR_robustness") != std::string::npos || |
| 115 gpu_info->gl_extensions.find("GL_ARB_robustness") != std::string::npos; | 116 gpu_info->gl_extensions.find("GL_ARB_robustness") != std::string::npos; |
| 116 if (supports_robustness) { | 117 if (supports_robustness) { |
| 117 glGetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, | 118 glGetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, |
| 118 reinterpret_cast<GLint*>(&gpu_info->gl_reset_notification_strategy)); | 119 reinterpret_cast<GLint*>(&gpu_info->gl_reset_notification_strategy)); |
| 119 } | 120 } |
| 120 | 121 |
| 121 // TODO(kbr): remove once the destruction of a current context automatically | 122 // TODO(kbr): remove once the destruction of a current context automatically |
| 122 // clears the current context. | 123 // clears the current context. |
| 123 context->ReleaseCurrent(surface.get()); | 124 context->ReleaseCurrent(surface.get()); |
| 124 | 125 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 155 basic_gpu_info->sandboxed = context_gpu_info.sandboxed; | 156 basic_gpu_info->sandboxed = context_gpu_info.sandboxed; |
| 156 basic_gpu_info->direct_rendering = context_gpu_info.direct_rendering; | 157 basic_gpu_info->direct_rendering = context_gpu_info.direct_rendering; |
| 157 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; |
| 158 basic_gpu_info->initialization_time = context_gpu_info.initialization_time; | 159 basic_gpu_info->initialization_time = context_gpu_info.initialization_time; |
| 159 basic_gpu_info->video_encode_accelerator_supported_profiles = | 160 basic_gpu_info->video_encode_accelerator_supported_profiles = |
| 160 context_gpu_info.video_encode_accelerator_supported_profiles; | 161 context_gpu_info.video_encode_accelerator_supported_profiles; |
| 161 } | 162 } |
| 162 | 163 |
| 163 } // namespace gpu | 164 } // namespace gpu |
| 164 | 165 |
| OLD | NEW |