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

Unified Diff: ui/gfx/gl/gl_context_glx.cc

Issue 6987025: Apply setInterval to new surface-context pairs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add logging Created 9 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_context_glx.cc
diff --git a/ui/gfx/gl/gl_context_glx.cc b/ui/gfx/gl/gl_context_glx.cc
index 12013b553dde7d0401fdfc8a756efc0a275929bb..e67400400550c327360a9fcab173b4e6fc65eb4e 100644
--- a/ui/gfx/gl/gl_context_glx.cc
+++ b/ui/gfx/gl/gl_context_glx.cc
@@ -119,12 +119,21 @@ void GLContextGLX::SetSwapInterval(int interval) {
// manager. At the moment, compositing window managers don't
// respect this setting anyway (tearing still occurs) and it
// dramatically increases latency.
- if (!IsCompositingWindowManagerActive(GLSurfaceGLX::GetDisplay())) {
- glXSwapIntervalEXT(
- GLSurfaceGLX::GetDisplay(),
- glXGetCurrentDrawable(),
- interval);
+ if (interval == 1 &&
+ IsCompositingWindowManagerActive(GLSurfaceGLX::GetDisplay())) {
+ LOG(INFO) <<
+ "Forcing vsync off because compositing window manager was detected.";
+ interval = 0;
}
+ glXSwapIntervalEXT(
+ GLSurfaceGLX::GetDisplay(),
+ glXGetCurrentDrawable(),
+ interval);
+ } else {
+ if(interval == 0)
+ LOG(WARNING) <<
+ "Could not disable vsync: driver does not "
+ "support GLX_EXT_swap_control";
}
}
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698