[PATCH] present: Support PresentOptionCopy

Keith Packard keithp at keithp.com
Wed Sep 10 14:02:13 PDT 2014


We added this option to the present protocol before 1.0 but somehow
never implemented it in the server. It's pretty simple; just don't
ever do flips if the application specifies Copy.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 present/present.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/present/present.c b/present/present.c
index 47d434b..e838da7 100644
--- a/present/present.c
+++ b/present/present.c
@@ -837,7 +837,10 @@ present_pixmap(WindowPtr window,
     if (!screen_priv->info || !(screen_priv->info->capabilities & PresentCapabilityAsync))
         vblank->sync_flip = TRUE;
 
-    if (pixmap && present_check_flip (target_crtc, window, pixmap, vblank->sync_flip, valid, x_off, y_off)) {
+    if (!(options & PresentOptionCopy) &&
+        pixmap != NULL &&
+        present_check_flip (target_crtc, window, pixmap, vblank->sync_flip, valid, x_off, y_off))
+    {
         vblank->flip = TRUE;
         if (vblank->sync_flip)
             target_msc--;
-- 
2.0.1



More information about the xorg-devel mailing list