mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 04:30:35 +01:00
dri2: Don't page flip when the window size doesn't match the pixmap size
If the drawable size doesn't match the pixmap size page flipping should
not be allowed.
If the window is larger than the pixmap, page flipping might need to
reposition the CRTC somewhere in the middle of the pixmap. I didn't
spot any code that would handle that at least in the intel driver.
Also the root pixmap could then move to some negative screen
coordinates. Not sure if all bits of code could handle that. Perhaps
when composite is enabled screen_x/y would make it work, but without
composite there's no way that it would work AFAICS.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
(cherry picked from commit 0ce25fd790)
This commit is contained in:
parent
651a96982f
commit
005b465048
1 changed files with 11 additions and 0 deletions
|
|
@ -640,6 +640,17 @@ DRI2CanFlip(DrawablePtr pDraw)
|
|||
if (!RegionEqual(&pWin->clipList, &pRoot->winSize))
|
||||
return FALSE;
|
||||
|
||||
/* Does the window match the pixmap exactly? */
|
||||
if (pDraw->x != 0 ||
|
||||
pDraw->y != 0 ||
|
||||
#ifdef COMPOSITE
|
||||
pDraw->x != pWinPixmap->screen_x ||
|
||||
pDraw->y != pWinPixmap->screen_y ||
|
||||
#endif
|
||||
pDraw->width != pWinPixmap->drawable.width ||
|
||||
pDraw->height != pWinPixmap->drawable.height)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue