| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 context_)) { | 125 context_)) { |
| 126 DVLOG(1) << "eglMakeCurrent failed with error " | 126 DVLOG(1) << "eglMakeCurrent failed with error " |
| 127 << GetLastEGLErrorString(); | 127 << GetLastEGLErrorString(); |
| 128 return false; | 128 return false; |
| 129 } | 129 } |
| 130 | 130 |
| 131 // Set this as soon as the context is current, since we might call into GL. | 131 // Set this as soon as the context is current, since we might call into GL. |
| 132 SetRealGLApi(); | 132 SetRealGLApi(); |
| 133 | 133 |
| 134 SetCurrent(surface); | 134 SetCurrent(surface); |
| 135 if (!InitializeDynamicBindings()) { | 135 InitializeDynamicBindings(); |
| 136 return false; | |
| 137 } | |
| 138 | 136 |
| 139 if (!surface->OnMakeCurrent(this)) { | 137 if (!surface->OnMakeCurrent(this)) { |
| 140 LOG(ERROR) << "Could not make current."; | 138 LOG(ERROR) << "Could not make current."; |
| 141 return false; | 139 return false; |
| 142 } | 140 } |
| 143 | 141 |
| 144 surface->OnSetSwapInterval(swap_interval_); | 142 surface->OnSetSwapInterval(swap_interval_); |
| 145 | 143 |
| 146 release_current.Cancel(); | 144 release_current.Cancel(); |
| 147 return true; | 145 return true; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 216 |
| 219 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { | 217 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { |
| 220 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); | 218 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); |
| 221 } | 219 } |
| 222 | 220 |
| 223 GLContextEGL::~GLContextEGL() { | 221 GLContextEGL::~GLContextEGL() { |
| 224 Destroy(); | 222 Destroy(); |
| 225 } | 223 } |
| 226 | 224 |
| 227 } // namespace gl | 225 } // namespace gl |
| OLD | NEW |