Commit 0ce25fd7 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

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: default avatarVille Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Alex Deucher's avatarAlex Deucher <alexdeucher@gmail.com>
parent efcb63d0
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment