mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 07:50:05 +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.
This commit is contained in:
parent
820bc60438
commit
dc37f91d94
1 changed files with 5 additions and 2 deletions
|
|
@ -1238,7 +1238,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;
|
||||||
|
|
@ -1249,7 +1250,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…
Add table
Reference in a new issue