summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-12 15:48:08 -0800
committerKeith Packard <keithp@keithp.com>2013-12-20 12:28:00 -0800
commit2eb9915eea358f941702d3dad7434197991885c5 (patch)
treeb8bb830f520c8dfc6af0f1c8f118161b68c0721f
parente487babd525ef1bd016ec7b283fa08cf9e6c6f4f (diff)
present: Set complete notify mode to Skip as needed
Skipped present pixmap calls were not setting the mode to PresentCompleteModeSkip for skipped operations. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--present/present.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/present/present.c b/present/present.c
index 3caa8b771..30cd3b936 100644
--- a/present/present.c
+++ b/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);
}