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
da7d9aa1fb
commit
006f652505
|
@ -1239,7 +1239,8 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
int dstY = pBox->y1;
|
int dstY = pBox->y1;
|
||||||
int tileY;
|
int tileY;
|
||||||
|
|
||||||
tileY = (dstY - yoff - pDrawable->y - pPatOrg->y) % tileHeight;
|
modulus(dstY - yoff - pDrawable->y - pPatOrg->y, tileHeight, tileY);
|
||||||
|
|
||||||
while (height > 0) {
|
while (height > 0) {
|
||||||
int width = pBox->x2 - pBox->x1;
|
int width = pBox->x2 - pBox->x1;
|
||||||
int dstX = pBox->x1;
|
int dstX = pBox->x1;
|
||||||
|
@ -1250,7 +1251,9 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
h = height;
|
h = height;
|
||||||
height -= h;
|
height -= h;
|
||||||
|
|
||||||
tileX = (dstX - xoff - pDrawable->x - pPatOrg->x) % tileWidth;
|
modulus(dstX - xoff - pDrawable->x - pPatOrg->x, tileWidth,
|
||||||
|
tileX);
|
||||||
|
|
||||||
while (width > 0) {
|
while (width > 0) {
|
||||||
int w = tileWidth - tileX;
|
int w = tileWidth - tileX;
|
||||||
if (w > width)
|
if (w > width)
|
||||||
|
|
Loading…
Reference in New Issue