xserver: Branch 'master' - 2 commits
Adam Jackson
ajax at kemper.freedesktop.org
Mon Aug 15 19:15:49 UTC 2016
present/present.c | 9 +++++----
present/present_priv.h | 6 ++++++
present/present_screen.c | 6 ++++--
3 files changed, 15 insertions(+), 6 deletions(-)
New commits:
commit d21b53673b9de052004e761fd1299d2e788b44b8
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Aug 3 10:19:20 2016 +0900
present: Call set_abort_flip / restore_screen_pixmap in clear_window_flip
We were asserting that these were called before from other places, but
that isn't always the case, e.g. during server shutdown.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96951
Reported-and-Tested-by: Tod Jackson <tod.jackson at gmail.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
diff --git a/present/present.c b/present/present.c
index 8d37395..a7ca06e 100644
--- a/present/present.c
+++ b/present/present.c
@@ -417,7 +417,7 @@ present_set_tree_pixmap(WindowPtr window,
TraverseTree(window, present_set_tree_pixmap_visit, &visit);
}
-static void
+void
present_restore_screen_pixmap(ScreenPtr screen)
{
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
@@ -451,7 +451,7 @@ present_restore_screen_pixmap(ScreenPtr screen)
present_set_tree_pixmap(screen->root, NULL, screen_pixmap);
}
-static void
+void
present_set_abort_flip(ScreenPtr screen)
{
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
diff --git a/present/present_priv.h b/present/present_priv.h
index 0d16cfa..dfb4bde 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -187,6 +187,12 @@ void
present_flip_destroy(ScreenPtr screen);
void
+present_restore_screen_pixmap(ScreenPtr screen);
+
+void
+present_set_abort_flip(ScreenPtr screen);
+
+void
present_check_flip_window(WindowPtr window);
RRCrtcPtr
diff --git a/present/present_screen.c b/present/present_screen.c
index 2f91ac7..9d03c8a 100644
--- a/present/present_screen.c
+++ b/present/present_screen.c
@@ -92,11 +92,13 @@ present_clear_window_flip(WindowPtr window)
present_vblank_ptr flip_pending = screen_priv->flip_pending;
if (flip_pending && flip_pending->window == window) {
- assert (flip_pending->abort_flip);
+ present_set_abort_flip(screen);
flip_pending->window = NULL;
}
- if (screen_priv->flip_window == window)
+ if (screen_priv->flip_window == window) {
+ present_restore_screen_pixmap(screen);
screen_priv->flip_window = NULL;
+ }
}
/*
commit 9f04fa3babaaabe0ed5bf4aa2563755bc6c45723
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Aug 3 10:19:19 2016 +0900
present: Make present_restore_screen_pixmap handle screen->root == NULL
Easier than dealing with it in all paths that can end up here during
server shutdown.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
diff --git a/present/present.c b/present/present.c
index 5fde846..8d37395 100644
--- a/present/present.c
+++ b/present/present.c
@@ -439,7 +439,7 @@ present_restore_screen_pixmap(ScreenPtr screen)
* Only do this the first time for a particular unflip operation, or
* we'll probably scribble over other windows
*/
- if (screen->GetWindowPixmap(screen->root) == flip_pixmap)
+ if (screen->root && screen->GetWindowPixmap(screen->root) == flip_pixmap)
present_copy_region(&screen_pixmap->drawable, flip_pixmap, NULL, 0, 0);
/* Switch back to using the screen pixmap now to avoid
@@ -447,7 +447,8 @@ present_restore_screen_pixmap(ScreenPtr screen)
*/
if (flip_window)
present_set_tree_pixmap(flip_window, flip_pixmap, screen_pixmap);
- present_set_tree_pixmap(screen->root, NULL, screen_pixmap);
+ if (screen->root)
+ present_set_tree_pixmap(screen->root, NULL, screen_pixmap);
}
static void
More information about the xorg-commit
mailing list