Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: ui/gl/gl_context_egl.cc

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl_context_cgl.cc ('k') | ui/gl/gl_context_glx.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/gl/gl_context_cgl.cc ('k') | ui/gl/gl_context_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698