present: Remove superfluous set abort flip function in window mode

The function is never called from present_screen.c in contrast to the behavior
in screen mode.

In present_wnmd.c we can simply remove the function which does an unnecessary
check of the property before setting it and directly set the property at the
two locations the function was called previously.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
This commit is contained in:
Roman Gilg 2020-07-14 14:32:25 +02:00
parent ab880b8b9e
commit bf794bd7bf
2 changed files with 2 additions and 15 deletions

View File

@ -481,9 +481,6 @@ present_vblank_destroy(present_vblank_ptr vblank);
/*
* present_wnmd.c
*/
void
present_wnmd_set_abort_flip(WindowPtr window);
void
present_wnmd_init_mode_hooks(present_screen_priv_ptr screen_priv);

View File

@ -138,16 +138,6 @@ present_wnmd_toplvl_pixmap_window(WindowPtr window)
return w;
}
void
present_wnmd_set_abort_flip(WindowPtr window)
{
present_window_priv_ptr window_priv = present_window_priv(window);
if (!window_priv->flip_pending->abort_flip) {
window_priv->flip_pending->abort_flip = TRUE;
}
}
static void
present_wnmd_flips_stop(WindowPtr window)
{
@ -352,7 +342,7 @@ present_wnmd_check_flip_window (WindowPtr window)
if (flip_pending) {
if (!present_wnmd_check_flip(flip_pending->crtc, flip_pending->window, flip_pending->pixmap,
flip_pending->sync_flip, NULL, 0, 0, NULL))
present_wnmd_set_abort_flip(window);
window_priv->flip_pending->abort_flip = TRUE;
} else if (flip_active) {
if (!present_wnmd_check_flip(flip_active->crtc, flip_active->window, flip_active->pixmap,
flip_active->sync_flip, NULL, 0, 0, NULL))
@ -399,7 +389,7 @@ present_wnmd_cancel_flip(WindowPtr window)
present_window_priv_ptr window_priv = present_window_priv(window);
if (window_priv->flip_pending)
present_wnmd_set_abort_flip(window);
window_priv->flip_pending->abort_flip = TRUE;
else if (window_priv->flip_active)
present_wnmd_flips_stop(window);
}