| OLD | NEW |
| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 if (!glXMakeCurrent( | 170 if (!glXMakeCurrent( |
| 171 GLSurfaceGLX::GetDisplay(), | 171 GLSurfaceGLX::GetDisplay(), |
| 172 reinterpret_cast<GLXDrawable>(surface->GetHandle()), | 172 reinterpret_cast<GLXDrawable>(surface->GetHandle()), |
| 173 static_cast<GLXContext>(context_))) { | 173 static_cast<GLXContext>(context_))) { |
| 174 LOG(ERROR) << "Couldn't make context current with X drawable."; | 174 LOG(ERROR) << "Couldn't make context current with X drawable."; |
| 175 Destroy(); | 175 Destroy(); |
| 176 return false; | 176 return false; |
| 177 } | 177 } |
| 178 | 178 |
| 179 SetCurrent(this, surface); | 179 SetCurrent(this, surface); |
| 180 if (!InitializeExtensionBindings()) { |
| 181 ReleaseCurrent(surface); |
| 182 return false; |
| 183 } |
| 184 |
| 180 if (!surface->OnMakeCurrent(this)) { | 185 if (!surface->OnMakeCurrent(this)) { |
| 181 LOG(ERROR) << "Could not make current."; | 186 LOG(ERROR) << "Could not make current."; |
| 182 return false; | 187 return false; |
| 183 } | 188 } |
| 184 | 189 |
| 185 return true; | 190 return true; |
| 186 } | 191 } |
| 187 | 192 |
| 188 void GLContextGLX::ReleaseCurrent(GLSurface* surface) { | 193 void GLContextGLX::ReleaseCurrent(GLSurface* surface) { |
| 189 if (!IsCurrent(surface)) | 194 if (!IsCurrent(surface)) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 } | 257 } |
| 253 | 258 |
| 254 return GLContext::GetExtensions(); | 259 return GLContext::GetExtensions(); |
| 255 } | 260 } |
| 256 | 261 |
| 257 bool GLContextGLX::WasAllocatedUsingARBRobustness() { | 262 bool GLContextGLX::WasAllocatedUsingARBRobustness() { |
| 258 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); | 263 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); |
| 259 } | 264 } |
| 260 | 265 |
| 261 } // namespace gfx | 266 } // namespace gfx |
| OLD | NEW |