diff options
author | marha <marha@users.sourceforge.net> | 2013-12-27 19:26:33 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-12-27 19:26:33 +0100 |
commit | 68c12003597662f95eac07ddeee99637f7caa3e5 (patch) | |
tree | 7be6c75560e85d73363da29707ed674ecf11552f /xorg-server/present | |
parent | e8eef3451671e4bea36194c85c16241e80163f8d (diff) | |
parent | f93b0a79de9ea56bea3e24797cc72625d9dcee3c (diff) | |
download | vcxsrv-68c12003597662f95eac07ddeee99637f7caa3e5.tar.gz vcxsrv-68c12003597662f95eac07ddeee99637f7caa3e5.tar.bz2 vcxsrv-68c12003597662f95eac07ddeee99637f7caa3e5.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver libxcb xcbproto mesa xkeyboard-config git update 27 Dec 2013
Diffstat (limited to 'xorg-server/present')
-rw-r--r-- | xorg-server/present/present.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c index 96ca99241..638bfb965 100644 --- a/xorg-server/present/present.c +++ b/xorg-server/present/present.c @@ -525,6 +525,7 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) WindowPtr window = vblank->window; ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); + uint8_t mode; if (vblank->wait_fence) { if (!present_fence_check_triggered(vblank->wait_fence)) { @@ -604,7 +605,20 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence); } - present_vblank_notify(vblank, vblank->kind, PresentCompleteModeCopy, ust, crtc_msc); + + /* Compute correct CompleteMode + */ + if (vblank->kind == PresentCompleteKindPixmap) { + if (vblank->pixmap && vblank->window) + mode = PresentCompleteModeCopy; + else + mode = PresentCompleteModeSkip; + } + else + mode = PresentCompleteModeCopy; + + + present_vblank_notify(vblank, vblank->kind, mode, ust, crtc_msc); present_vblank_destroy(vblank); } @@ -663,10 +677,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++; + } } /* @@ -681,6 +703,9 @@ present_pixmap(WindowPtr window, if (!vblank->pixmap) continue; + if (!vblank->queued) + continue; + if (vblank->crtc != target_crtc || vblank->target_msc != target_msc) continue; |