49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
From df3b03e05b5c826584fc75466f404b53844edcf4 Mon Sep 17 00:00:00 2001
|
|
From: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Date: Thu, 5 Feb 2015 14:11:40 -0500
|
|
Subject: [PATCH] present: Copy unflip contents back to the Screen Pixmap
|
|
|
|
As we unflip after the flip Window no longer passes the pixel ownership
|
|
test for the full Screen Pixmap, we can no longer utilize that Window to
|
|
copy the contents back to the backing pixmap. To first flip means that
|
|
the Window was originally backed by the Screen Pixmap and wholly covered
|
|
the Pixmap, thus we need to copy the last frame contents to the Screen
|
|
Pixmap when the flip chain is complete.
|
|
|
|
---
|
|
present/present.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/present/present.c b/present/present.c
|
|
index 8e4829e..a516575 100644
|
|
--- present/present.c
|
|
+++ present/present.c
|
|
@@ -377,20 +377,20 @@ present_set_tree_pixmap(WindowPtr window, PixmapPtr pixmap)
|
|
present_unflip(ScreenPtr screen)
|
|
{
|
|
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
|
|
+ PixmapPtr pixmap = (*screen->GetScreenPixmap)(screen);
|
|
|
|
assert (!screen_priv->unflip_event_id);
|
|
assert (!screen_priv->flip_pending);
|
|
|
|
if (screen_priv->flip_window)
|
|
- present_set_tree_pixmap(screen_priv->flip_window,
|
|
- (*screen->GetScreenPixmap)(screen));
|
|
+ present_set_tree_pixmap(screen_priv->flip_window, pixmap);
|
|
|
|
- present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
|
|
+ present_set_tree_pixmap(screen->root, pixmap);
|
|
|
|
/* Update the screen pixmap with the current flip pixmap contents
|
|
*/
|
|
if (screen_priv->flip_pixmap && screen_priv->flip_window) {
|
|
- present_copy_region(&screen_priv->flip_window->drawable,
|
|
+ present_copy_region(&pixmap->drawable,
|
|
screen_priv->flip_pixmap,
|
|
NULL, 0, 0);
|
|
}
|
|
--
|
|
2.1.0
|
|
|