present/wnmd: Can't use page flipping for windows clipped by children

Noticed this was missing while working on the following fix.

v2:
* Dropped present_wnmd_can_window_flip hunk (that function is never
  called, will be cleaned up in a follow-up MR).

Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> # v1
Reviewed-by: Roman Gilg <subdiff@gmail.com>
(cherry picked from commit 7ac303c7b1)
This commit is contained in:
Michel Dänzer 2020-09-07 18:35:10 +02:00 committed by Michel Dänzer
parent 1e84fda202
commit f4006d795c

View File

@ -291,6 +291,10 @@ present_wnmd_check_flip(RRCrtcPtr crtc,
if ( !RegionEqual(&window->winSize, &toplvl_window->winSize) ) if ( !RegionEqual(&window->winSize, &toplvl_window->winSize) )
return FALSE; return FALSE;
/* Can't flip if window clipped by children */
if (!RegionEqual(&window->clipList, &window->winSize))
return FALSE;
/* Ask the driver for permission */ /* Ask the driver for permission */
if (screen_priv->wnmd_info->check_flip2) { if (screen_priv->wnmd_info->check_flip2) {
if (!(*screen_priv->wnmd_info->check_flip2) (crtc, window, pixmap, sync_flip, reason)) { if (!(*screen_priv->wnmd_info->check_flip2) (crtc, window, pixmap, sync_flip, reason)) {