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 "ui/gl/gl_context.h" | 5 #include "ui/gl/gl_context.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 void GLContext::ForceSwapIntervalZero(bool force) { | 172 void GLContext::ForceSwapIntervalZero(bool force) { |
173 force_swap_interval_zero_ = force; | 173 force_swap_interval_zero_ = force; |
174 OnSetSwapInterval(force_swap_interval_zero_ ? 0 : swap_interval_); | 174 OnSetSwapInterval(force_swap_interval_zero_ ? 0 : swap_interval_); |
175 } | 175 } |
176 | 176 |
177 bool GLContext::WasAllocatedUsingRobustnessExtension() { | 177 bool GLContext::WasAllocatedUsingRobustnessExtension() { |
178 return false; | 178 return false; |
179 } | 179 } |
180 | 180 |
181 bool GLContext::InitializeDynamicBindings() { | 181 void GLContext::InitializeDynamicBindings() { |
182 DCHECK(IsCurrent(nullptr)); | 182 DCHECK(IsCurrent(nullptr)); |
183 bool initialized = InitializeDynamicGLBindings(GetGLImplementation(), this); | 183 InitializeDynamicGLBindingsGL(this); |
184 if (!initialized) | |
185 LOG(ERROR) << "Could not initialize dynamic bindings."; | |
186 return initialized; | |
187 } | 184 } |
188 | 185 |
189 void GLContext::SetupForVirtualization() { | 186 void GLContext::SetupForVirtualization() { |
190 if (!virtual_gl_api_) { | 187 if (!virtual_gl_api_) { |
191 virtual_gl_api_.reset(new VirtualGLApi()); | 188 virtual_gl_api_.reset(new VirtualGLApi()); |
192 virtual_gl_api_->Initialize(&g_driver_gl, this); | 189 virtual_gl_api_->Initialize(&g_driver_gl, this); |
193 } | 190 } |
194 } | 191 } |
195 | 192 |
196 bool GLContext::MakeVirtuallyCurrent( | 193 bool GLContext::MakeVirtuallyCurrent( |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 229 |
233 scoped_refptr<GLContext> InitializeGLContext(scoped_refptr<GLContext> context, | 230 scoped_refptr<GLContext> InitializeGLContext(scoped_refptr<GLContext> context, |
234 GLSurface* compatible_surface, | 231 GLSurface* compatible_surface, |
235 GpuPreference gpu_preference) { | 232 GpuPreference gpu_preference) { |
236 if (!context->Initialize(compatible_surface, gpu_preference)) | 233 if (!context->Initialize(compatible_surface, gpu_preference)) |
237 return nullptr; | 234 return nullptr; |
238 return context; | 235 return context; |
239 } | 236 } |
240 | 237 |
241 } // namespace gl | 238 } // namespace gl |
OLD | NEW |