[PATCH 3/3] present: Set complete notify mode to Skip as needed
Keith Packard
keithp at keithp.com
Fri Dec 13 23:59:29 PST 2013
Skipped present pixmap calls were not setting the mode to
PresentCompleteModeSkip for skipped operations.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
present/present.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/present/present.c b/present/present.c
index 3caa8b7..30cd3b9 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);
}
--
1.8.4.4
More information about the xorg-devel
mailing list