present: Don't abandon presents which are already queued for flip
authorKeith Packard <keithp@keithp.com>
Thu, 12 Dec 2013 22:52:35 +0000 (14:52 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 20 Dec 2013 20:28:00 +0000 (12:28 -0800)
Presents which are not marked 'queued' and are in the window present
list are waiting for the flip event; discarding those won't work very
well (it'll end up trashing displayed content for the next frame), so
skip over those when looking for duplicate frame presents

Signed-off-by: Keith Packard <keithp@keithp.com>
present/present.c

index 4c0d63b..3caa8b7 100644 (file)
@@ -689,6 +689,9 @@ present_pixmap(WindowPtr window,
             if (!vblank->pixmap)
                 continue;
 
+            if (!vblank->queued)
+                continue;
+
             if (vblank->crtc != target_crtc || vblank->target_msc != target_msc)
                 continue;