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

Side by Side Diff: ui/gl/gl_context_glx.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_egl.cc ('k') | ui/gl/gl_context_osmesa.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_glx.h" 5 #include "ui/gl/gl_context_glx.h"
6 6
7 extern "C" { 7 extern "C" {
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 } 9 }
10 #include <memory> 10 #include <memory>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 display_, 236 display_,
237 reinterpret_cast<GLXDrawable>(surface->GetHandle()), 237 reinterpret_cast<GLXDrawable>(surface->GetHandle()),
238 reinterpret_cast<GLXDrawable>(surface->GetHandle()), 238 reinterpret_cast<GLXDrawable>(surface->GetHandle()),
239 static_cast<GLXContext>(context_))) { 239 static_cast<GLXContext>(context_))) {
240 LOG(ERROR) << "Couldn't make context current with X drawable."; 240 LOG(ERROR) << "Couldn't make context current with X drawable.";
241 Destroy(); 241 Destroy();
242 return false; 242 return false;
243 } 243 }
244 244
245 // Set this as soon as the context is current, since we might call into GL. 245 // Set this as soon as the context is current, since we might call into GL.
246 SetRealGLApi(); 246 BindGLApi();
247 247
248 SetCurrent(surface); 248 SetCurrent(surface);
249 InitializeDynamicBindings(); 249 InitializeDynamicBindings();
250 250
251 if (!surface->OnMakeCurrent(this)) { 251 if (!surface->OnMakeCurrent(this)) {
252 LOG(ERROR) << "Could not make current."; 252 LOG(ERROR) << "Could not make current.";
253 Destroy(); 253 Destroy();
254 return false; 254 return false;
255 } 255 }
256 256
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() { 325 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() {
326 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); 326 return GLSurfaceGLX::IsCreateContextRobustnessSupported();
327 } 327 }
328 328
329 GLContextGLX::~GLContextGLX() { 329 GLContextGLX::~GLContextGLX() {
330 Destroy(); 330 Destroy();
331 } 331 }
332 332
333 } // namespace gl 333 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_context_egl.cc ('k') | ui/gl/gl_context_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698