| 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_egl.h" | 5 #include "ui/gl/gl_context_egl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 if (!eglMakeCurrent(display_, | 150 if (!eglMakeCurrent(display_, |
| 151 surface->GetHandle(), | 151 surface->GetHandle(), |
| 152 surface->GetHandle(), | 152 surface->GetHandle(), |
| 153 context_)) { | 153 context_)) { |
| 154 DVLOG(1) << "eglMakeCurrent failed with error " | 154 DVLOG(1) << "eglMakeCurrent failed with error " |
| 155 << GetLastEGLErrorString(); | 155 << GetLastEGLErrorString(); |
| 156 return false; | 156 return false; |
| 157 } | 157 } |
| 158 | 158 |
| 159 // Set this as soon as the context is current, since we might call into GL. | 159 // Set this as soon as the context is current, since we might call into GL. |
| 160 SetRealGLApi(); | 160 BindGLApi(); |
| 161 | 161 |
| 162 SetCurrent(surface); | 162 SetCurrent(surface); |
| 163 InitializeDynamicBindings(); | 163 InitializeDynamicBindings(); |
| 164 | 164 |
| 165 if (!surface->OnMakeCurrent(this)) { | 165 if (!surface->OnMakeCurrent(this)) { |
| 166 LOG(ERROR) << "Could not make current."; | 166 LOG(ERROR) << "Could not make current."; |
| 167 return false; | 167 return false; |
| 168 } | 168 } |
| 169 | 169 |
| 170 surface->OnSetSwapInterval(swap_interval_); | 170 surface->OnSetSwapInterval(swap_interval_); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 244 |
| 245 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { | 245 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { |
| 246 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); | 246 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 GLContextEGL::~GLContextEGL() { | 249 GLContextEGL::~GLContextEGL() { |
| 250 Destroy(); | 250 Destroy(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace gl | 253 } // namespace gl |
| OLD | NEW |