present: Check valid region in window mode flips
For Pixmap flips to have well defined outcomes the window must be contained by the valid region if such region was specified. The valid region is inserted as an argument to the check in window mode. Setting this argument is missing in screen mode as well but we ignore it for now and only add it to window mode. It seems there are none or only very few clients actually making use of valid regions at the moment. For simplicity we therefore just check if a valid region was set by the client and in this case do never flip, independently of the window being contained by the region or not. Signed-off-by: Roman Gilg <subdiff@gmail.com>
This commit is contained in:
parent
bf794bd7bf
commit
591916ea9e
|
@ -294,7 +294,9 @@ present_wnmd_check_flip(RRCrtcPtr crtc,
|
|||
if (x_off || y_off)
|
||||
return FALSE;
|
||||
|
||||
// TODO: Check for valid region?
|
||||
/* Valid area must contain window (for simplicity for now just never flip when one is set). */
|
||||
if (valid)
|
||||
return FALSE;
|
||||
|
||||
/* Flip pixmap must have same dimensions as window */
|
||||
if (window->drawable.width != pixmap->drawable.width ||
|
||||
|
@ -341,11 +343,11 @@ 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))
|
||||
flip_pending->sync_flip, flip_pending->valid, 0, 0, NULL))
|
||||
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))
|
||||
flip_active->sync_flip, flip_active->valid, 0, 0, NULL))
|
||||
present_wnmd_flips_stop(window);
|
||||
}
|
||||
|
||||
|
@ -353,7 +355,7 @@ present_wnmd_check_flip_window (WindowPtr window)
|
|||
xorg_list_for_each_entry(vblank, &window_priv->vblank, window_list) {
|
||||
if (vblank->queued && vblank->flip &&
|
||||
!present_wnmd_check_flip(vblank->crtc, window, vblank->pixmap,
|
||||
vblank->sync_flip, NULL, 0, 0, &reason)) {
|
||||
vblank->sync_flip, vblank->valid, 0, 0, &reason)) {
|
||||
vblank->flip = FALSE;
|
||||
vblank->reason = reason;
|
||||
if (vblank->sync_flip)
|
||||
|
|
Loading…
Reference in New Issue
Block a user