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

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

Issue 8381001: Split GL binding init into core and extension part (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added dependencies to gl.gyp. Used NOT_REACHED() instead of DCHECK(0). Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include "ui/gfx/gl/gl_context_glx.h" 9 #include "ui/gfx/gl/gl_context_glx.h"
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (!glXMakeCurrent( 171 if (!glXMakeCurrent(
172 display_, 172 display_,
173 reinterpret_cast<GLXDrawable>(surface->GetHandle()), 173 reinterpret_cast<GLXDrawable>(surface->GetHandle()),
174 static_cast<GLXContext>(context_))) { 174 static_cast<GLXContext>(context_))) {
175 LOG(ERROR) << "Couldn't make context current with X drawable."; 175 LOG(ERROR) << "Couldn't make context current with X drawable.";
176 Destroy(); 176 Destroy();
177 return false; 177 return false;
178 } 178 }
179 179
180 SetCurrent(this, surface); 180 SetCurrent(this, surface);
181 if (!InitializeExtensionBindings()) {
182 ReleaseCurrent(surface);
183 return false;
184 }
185
181 if (!surface->OnMakeCurrent(this)) { 186 if (!surface->OnMakeCurrent(this)) {
182 LOG(ERROR) << "Could not make current."; 187 LOG(ERROR) << "Could not make current.";
183 return false; 188 return false;
184 } 189 }
185 190
186 return true; 191 return true;
187 } 192 }
188 193
189 void GLContextGLX::ReleaseCurrent(GLSurface* surface) { 194 void GLContextGLX::ReleaseCurrent(GLSurface* surface) {
190 if (!IsCurrent(surface)) 195 if (!IsCurrent(surface))
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 258 }
254 259
255 return GLContext::GetExtensions(); 260 return GLContext::GetExtensions();
256 } 261 }
257 262
258 bool GLContextGLX::WasAllocatedUsingARBRobustness() { 263 bool GLContextGLX::WasAllocatedUsingARBRobustness() {
259 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); 264 return GLSurfaceGLX::IsCreateContextRobustnessSupported();
260 } 265 }
261 266
262 } // namespace gfx 267 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/gl/gl_context_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698