[x11spice,06/10] Implement page flips.

Submitted by Jeremy White on Sept. 16, 2019, 7:13 p.m.

Details

Message ID 20190916191333.27139-7-jwhite@codeweavers.com
State New
Headers show
Series "Provide a simulated set of outputs and crtcs" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Jeremy White Sept. 16, 2019, 7:13 p.m.
From: Henri Verbeet <hverbeet@codeweavers.com>

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

Patch hide | download patch | download mbox

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);
 }