summaryrefslogtreecommitdiff
path: root/present/present.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-02-06 08:25:42 +0000
committerAdam Jackson <ajax@redhat.com>2015-06-16 11:21:26 -0400
commit6cc61df989c7764097c9b21d71386e230fa13cd4 (patch)
tree69f4c72a79f6a753c4a7d7a464c8dc4c347be4a1 /present/present.c
parent8b7e1f362bf6940eb863fd02395bf8155d10604b (diff)
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. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit 806470b9f623089dc81b985f250f0c3a4e8edbe8)
Diffstat (limited to 'present/present.c')
-rw-r--r--present/present.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/present/present.c b/present/present.c
index 2a705a968..a6346015e 100644
--- a/present/present.c
+++ b/present/present.c
@@ -409,20 +409,20 @@ static void
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);
}