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>
This commit is contained in:
Keith Packard 2014-09-10 14:02:13 -07:00
parent 69d8572ae4
commit 2051514652
1 changed files with 4 additions and 1 deletions

View File

@ -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--;