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

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

Issue 2129043003: Make dynamic mock bindings initialization consistent with other GL implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 static_cast<GLXContext>(context_))) { 107 static_cast<GLXContext>(context_))) {
108 LOG(ERROR) << "Couldn't make context current with X drawable."; 108 LOG(ERROR) << "Couldn't make context current with X drawable.";
109 Destroy(); 109 Destroy();
110 return false; 110 return false;
111 } 111 }
112 112
113 // Set this as soon as the context is current, since we might call into GL. 113 // Set this as soon as the context is current, since we might call into GL.
114 SetRealGLApi(); 114 SetRealGLApi();
115 115
116 SetCurrent(surface); 116 SetCurrent(surface);
117 if (!InitializeDynamicBindings()) { 117 InitializeDynamicBindings();
118 Destroy();
119 return false;
120 }
121 118
122 if (!surface->OnMakeCurrent(this)) { 119 if (!surface->OnMakeCurrent(this)) {
123 LOG(ERROR) << "Could not make current."; 120 LOG(ERROR) << "Could not make current.";
124 Destroy(); 121 Destroy();
125 return false; 122 return false;
126 } 123 }
127 124
128 release_current.Cancel(); 125 release_current.Cancel();
129 return true; 126 return true;
130 } 127 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 192
196 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() { 193 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() {
197 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); 194 return GLSurfaceGLX::IsCreateContextRobustnessSupported();
198 } 195 }
199 196
200 GLContextGLX::~GLContextGLX() { 197 GLContextGLX::~GLContextGLX() {
201 Destroy(); 198 Destroy();
202 } 199 }
203 200
204 } // namespace gl 201 } // 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