present: Handle PresentOptionAsync for copy mode

Check for Async flag and execute immediately if set, otherwise wait
for the next appropriate vblank before copying.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2013-12-12 14:17:40 -08:00
parent a68df14742
commit ca3a5b2a8f

View File

@ -663,10 +663,18 @@ present_pixmap(WindowPtr window,
if (crtc_msc >= target_msc) {
if (divisor != 0) {
target_msc = crtc_msc - (crtc_msc % divisor) + remainder;
if (target_msc <= crtc_msc)
target_msc += divisor;
} else
if (options & PresentOptionAsync) {
if (target_msc < crtc_msc)
target_msc += divisor;
} else {
if (target_msc <= crtc_msc)
target_msc += divisor;
}
} else {
target_msc = crtc_msc;
if (!(options & PresentOptionAsync))
target_msc++;
}
}
/*