EXA: Make sure tile offsets passed to drivers are never negative.
Thanks to Björn Steinbrink for pointing out the problem on IRC.
This commit is contained in:
parent
820bc60438
commit
dc37f91d94
|
@ -1238,7 +1238,8 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
int dstY = pBox->y1;
|
||||
int tileY;
|
||||
|
||||
tileY = (dstY - yoff - pDrawable->y - pPatOrg->y) % tileHeight;
|
||||
modulus(dstY - yoff - pDrawable->y - pPatOrg->y, tileHeight, tileY);
|
||||
|
||||
while (height > 0) {
|
||||
int width = pBox->x2 - pBox->x1;
|
||||
int dstX = pBox->x1;
|
||||
|
@ -1249,7 +1250,9 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
h = height;
|
||||
height -= h;
|
||||
|
||||
tileX = (dstX - xoff - pDrawable->x - pPatOrg->x) % tileWidth;
|
||||
modulus(dstX - xoff - pDrawable->x - pPatOrg->x, tileWidth,
|
||||
tileX);
|
||||
|
||||
while (width > 0) {
|
||||
int w = tileWidth - tileX;
|
||||
if (w > width)
|
||||
|
|
Loading…
Reference in New Issue
Block a user