[Spice-devel] [PATCH x11spice 06/10] Implement page flips.

Jeremy White jwhite at codeweavers.com
Mon Sep 16 19:13:29 UTC 2019


From: Henri Verbeet <hverbeet at codeweavers.com>

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Jeremy White <jwhite 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 ad29dc91..40290d70 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.20.1



More information about the Spice-devel mailing list