Check for Async flag and execute immediately if set, otherwise wait for the next appropriate vblank before copying.
Signed-off-by: Keith Packard <[email protected]> --- present/present.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/present/present.c b/present/present.c index 50bd055..4c0d63b 100644 --- a/present/present.c +++ b/present/present.c @@ -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++; + } } /* -- 1.8.4.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
