| 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_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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |