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

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

Issue 11266023: Make GL calls go through subclassable class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/gl/gl_bindings.h ('k') | ui/gl/gl_context_wgl.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) 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 return true; 213 return true;
214 } 214 }
215 215
216 void* GLContextGLX::GetHandle() { 216 void* GLContextGLX::GetHandle() {
217 return context_; 217 return context_;
218 } 218 }
219 219
220 void GLContextGLX::SetSwapInterval(int interval) { 220 void GLContextGLX::SetSwapInterval(int interval) {
221 DCHECK(IsCurrent(NULL)); 221 DCHECK(IsCurrent(NULL));
222 if (HasExtension("GLX_EXT_swap_control") && glXSwapIntervalEXT) { 222 if (HasExtension("GLX_EXT_swap_control") &&
223 g_driver_glx.fn.glXSwapIntervalEXTFn) {
223 glXSwapIntervalEXT( 224 glXSwapIntervalEXT(
224 display_, 225 display_,
225 glXGetCurrentDrawable(), 226 glXGetCurrentDrawable(),
226 interval); 227 interval);
227 } else if (HasExtension("GLX_MESA_swap_control") && glXSwapIntervalMESA) { 228 } else if (HasExtension("GLX_MESA_swap_control") &&
229 g_driver_glx.fn.glXSwapIntervalMESAFn) {
228 glXSwapIntervalMESA(interval); 230 glXSwapIntervalMESA(interval);
229 } else { 231 } else {
230 if(interval == 0) 232 if(interval == 0)
231 LOG(WARNING) << 233 LOG(WARNING) <<
232 "Could not disable vsync: driver does not " 234 "Could not disable vsync: driver does not "
233 "support GLX_EXT_swap_control"; 235 "support GLX_EXT_swap_control";
234 } 236 }
235 } 237 }
236 238
237 std::string GLContextGLX::GetExtensions() { 239 std::string GLContextGLX::GetExtensions() {
(...skipping 20 matching lines...) Expand all
258 260
259 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() { 261 bool GLContextGLX::WasAllocatedUsingRobustnessExtension() {
260 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); 262 return GLSurfaceGLX::IsCreateContextRobustnessSupported();
261 } 263 }
262 264
263 GLContextGLX::~GLContextGLX() { 265 GLContextGLX::~GLContextGLX() {
264 Destroy(); 266 Destroy();
265 } 267 }
266 268
267 } // namespace gfx 269 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | ui/gl/gl_context_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698