summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-09-10 14:02:13 -0700
committerKeith Packard <keithp@keithp.com>2014-09-18 15:31:37 -0700
commit2051514652481a83bd7cf22e57cb0fcd40333f33 (patch)
tree74e97425cff7fdcfe0bb5512cb11ea2e9c3cfaaa /present
parent69d8572ae4cd1bce17223ea8aff87916a974c861 (diff)
present: Support PresentOptionCopy
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@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'present')
-rw-r--r--present/present.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/present/present.c b/present/present.c
index f488e21cc..9be690ce6 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--;