EXA: Make sure tile offsets passed to drivers are never negative.
Thanks to Björn Steinbrink for pointing out the problem on IRC.
(cherry picked from commit 006f652505
with
modifications.)
This commit is contained in:
parent
732d586b09
commit
75b9dc907b
|
@ -1187,7 +1187,8 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
int dstY = pBox->y1;
|
||||
int tileY;
|
||||
|
||||
tileY = (dstY - pDrawable->y - pPatOrg->y) % tileHeight;
|
||||
modulus(dstY - pDrawable->y - pPatOrg->y, tileHeight, tileY);
|
||||
|
||||
while (height > 0) {
|
||||
int width = pBox->x2 - pBox->x1;
|
||||
int dstX = pBox->x1;
|
||||
|
@ -1198,7 +1199,8 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
|||
h = height;
|
||||
height -= h;
|
||||
|
||||
tileX = (dstX - pDrawable->x - pPatOrg->x) % tileWidth;
|
||||
modulus(dstX - pDrawable->x - pPatOrg->x, tileWidth, tileX);
|
||||
|
||||
while (width > 0) {
|
||||
int w = tileWidth - tileX;
|
||||
if (w > width)
|
||||
|
|
Loading…
Reference in New Issue
Block a user