| 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 extern "C" { | 5 extern "C" { |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 } | 7 } |
| 8 | 8 |
| 9 #include "ui/gl/gl_context_glx.h" | 9 #include "ui/gl/gl_context_glx.h" |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 static_cast<GLXContext>(context_))) { | 120 static_cast<GLXContext>(context_))) { |
| 121 LOG(ERROR) << "Couldn't make context current with X drawable."; | 121 LOG(ERROR) << "Couldn't make context current with X drawable."; |
| 122 Destroy(); | 122 Destroy(); |
| 123 return false; | 123 return false; |
| 124 } | 124 } |
| 125 | 125 |
| 126 // Set this as soon as the context is current, since we might call into GL. | 126 // Set this as soon as the context is current, since we might call into GL. |
| 127 SetRealGLApi(); | 127 SetRealGLApi(); |
| 128 | 128 |
| 129 SetCurrent(surface); | 129 SetCurrent(surface); |
| 130 if (!InitializeExtensionBindings()) { | 130 if (!InitializeDynamicBindings()) { |
| 131 ReleaseCurrent(surface); | 131 ReleaseCurrent(surface); |
| 132 Destroy(); | 132 Destroy(); |
| 133 return false; | 133 return false; |
| 134 } | 134 } |
| 135 | 135 |
| 136 if (!surface->OnMakeCurrent(this)) { | 136 if (!surface->OnMakeCurrent(this)) { |
| 137 LOG(ERROR) << "Could not make current."; | 137 LOG(ERROR) << "Could not make current."; |
| 138 ReleaseCurrent(surface); | 138 ReleaseCurrent(surface); |
| 139 Destroy(); | 139 Destroy(); |
| 140 return false; | 140 return false; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 221 |
| 222 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() { | 222 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() { |
| 223 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); | 223 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 GLContextGLX::~GLContextGLX() { | 226 GLContextGLX::~GLContextGLX() { |
| 227 Destroy(); | 227 Destroy(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace gfx | 230 } // namespace gfx |
| OLD | NEW |