diff options
-rw-r--r-- | exa/exa_accel.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 3732f88c7..a29f3d082 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -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) |