summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-12 14:17:40 -0800
committerKeith Packard <keithp@keithp.com>2013-12-20 12:28:00 -0800
commitca3a5b2a8f9f627bbaa9883e16512a21c2a0b81d (patch)
tree7232d5eaf8a3261a53819fe6ab7bd6cebc2e4fb5
parenta68df147421da21528b5be2d34678383922fa352 (diff)
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>
-rw-r--r--present/present.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/present/present.c b/present/present.c
index 50bd05539..4c0d63baf 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++;
+ }
}
/*