From 8bea96d7018d02dff9462326ca9456f48e9fe9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 9 Oct 2015 18:47:14 +0200 Subject: [PATCH] wait for GL after swapping otherwise at least on the nvidia blob the swapping doesn't block even for double buffering REVIEW: 125659 BUG: 346275 CCBUG: 351700 FIXED-IN: 5.5 --- glxbackend.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glxbackend.cpp b/glxbackend.cpp index 4c9e78c962..34408533e8 100644 --- a/glxbackend.cpp +++ b/glxbackend.cpp @@ -649,6 +649,10 @@ void GlxBackend::present() } setBlocksForRetrace(result == 'd'); } + } else if (blocksForRetrace()) { + // at least the nvidia blob manages to swap async, ie. return immediately on double + // buffering - what messes our timing calculation and leads to laggy behavior #346275 + glXWaitGL(); } } else { waitSync();