[Spice-devel] [PATCH x11spice 6/8] Implement page flips.

Henri Verbeet hverbeet at codeweavers.com
Tue Feb 18 19:53:35 UTC 2020


Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 spice-video-dummy/src/present.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/spice-video-dummy/src/present.c b/spice-video-dummy/src/present.c
index ad29dc9..40290d7 100644
--- a/spice-video-dummy/src/present.c
+++ b/spice-video-dummy/src/present.c
@@ -162,19 +162,24 @@ dummy_present_flush(WindowRec * window)
 static Bool
 dummy_present_check_flip(RRCrtcRec * crtc, WindowRec * window, PixmapRec * pixmap, Bool sync_flip)
 {
-    return FALSE;
+    const ScrnInfoRec *scrn = xf86ScreenToScrn(crtc->pScreen);
+    const DUMMYRec *dummy = scrn->driverPrivate;
+
+    return !dummy->swCursor;
 }
 
 static Bool
 dummy_present_flip(RRCrtcRec * crtc, uint64_t event_id,
                    uint64_t target_msc, PixmapRec * pixmap, Bool sync_flip)
 {
-    return FALSE;
+    glamor_block_handler(crtc->pScreen);
+    return dummy_present_queue_vblank(crtc, event_id, target_msc) == Success;
 }
 
 static void
 dummy_present_unflip(ScreenRec * screen, uint64_t event_id)
 {
+    glamor_block_handler(screen);
     present_event_notify(event_id, 0, 0);
 }
 
-- 
2.11.0



More information about the Spice-devel mailing list