mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-28 18:00:07 +01:00
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
1 changed files with 4 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue