mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
present: Dispatch clear_window_flip via present_screen_priv hook
Eliminates special cases in present_destroy_window. Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
committed by
Michel Dänzer
parent
93666ebe37
commit
b6d54b0f5d
@@ -495,6 +495,26 @@ present_scmd_can_window_flip(WindowPtr window)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clean up any pending or current flips for this window
|
||||
*/
|
||||
static void
|
||||
present_scmd_clear_window_flip(WindowPtr window)
|
||||
{
|
||||
ScreenPtr screen = window->drawable.pScreen;
|
||||
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
|
||||
present_vblank_ptr flip_pending = screen_priv->flip_pending;
|
||||
|
||||
if (flip_pending && flip_pending->window == window) {
|
||||
present_set_abort_flip(screen);
|
||||
flip_pending->window = NULL;
|
||||
}
|
||||
if (screen_priv->flip_window == window) {
|
||||
present_restore_screen_pixmap(screen);
|
||||
screen_priv->flip_window = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Once the required MSC has been reached, execute the pending request.
|
||||
*
|
||||
@@ -812,6 +832,7 @@ present_scmd_init_mode_hooks(present_screen_priv_ptr screen_priv)
|
||||
screen_priv->check_flip = &present_check_flip;
|
||||
screen_priv->check_flip_window = &present_check_flip_window;
|
||||
screen_priv->can_window_flip = &present_scmd_can_window_flip;
|
||||
screen_priv->clear_window_flip = &present_scmd_clear_window_flip;
|
||||
|
||||
screen_priv->present_pixmap = &present_scmd_pixmap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user