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/gfx/gl/gl_context_glx.h" | 9 #include "ui/gfx/gl/gl_context_glx.h" |
10 | 10 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
208 return true; | 208 return true; |
209 } | 209 } |
210 | 210 |
211 void* GLContextGLX::GetHandle() { | 211 void* GLContextGLX::GetHandle() { |
212 return context_; | 212 return context_; |
213 } | 213 } |
214 | 214 |
| 215 Display* GLContextGLX::GetDisplay() { |
| 216 return display_; |
| 217 } |
| 218 |
215 void GLContextGLX::SetSwapInterval(int interval) { | 219 void GLContextGLX::SetSwapInterval(int interval) { |
216 DCHECK(IsCurrent(NULL)); | 220 DCHECK(IsCurrent(NULL)); |
217 if (HasExtension("GLX_EXT_swap_control") && glXSwapIntervalEXT) { | 221 if (HasExtension("GLX_EXT_swap_control") && glXSwapIntervalEXT) { |
218 glXSwapIntervalEXT( | 222 glXSwapIntervalEXT( |
219 display_, | 223 display_, |
220 glXGetCurrentDrawable(), | 224 glXGetCurrentDrawable(), |
221 interval); | 225 interval); |
222 } else { | 226 } else { |
223 if(interval == 0) | 227 if(interval == 0) |
224 LOG(WARNING) << | 228 LOG(WARNING) << |
(...skipping 10 matching lines...) Expand all Loading... |
235 } | 239 } |
236 | 240 |
237 return GLContext::GetExtensions(); | 241 return GLContext::GetExtensions(); |
238 } | 242 } |
239 | 243 |
240 bool GLContextGLX::WasAllocatedUsingARBRobustness() { | 244 bool GLContextGLX::WasAllocatedUsingARBRobustness() { |
241 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); | 245 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); |
242 } | 246 } |
243 | 247 |
244 } // namespace gfx | 248 } // namespace gfx |
OLD | NEW |