mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-26 07:40:05 +01:00
Fixed a rendering bug at fillspans.
We should not change the points coords when loop for the clip rects. Change to use another variable to store the clipped coords and keep the original coords. This bug cause some XTS failures. Now fix it. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
70b6341538
commit
fbccc4bbbc
1 changed files with 10 additions and 10 deletions
|
|
@ -55,19 +55,19 @@ _glamor_fill_spans(DrawablePtr drawable,
|
|||
nbox = REGION_NUM_RECTS(pClip);
|
||||
pbox = REGION_RECTS(pClip);
|
||||
while (nbox--) {
|
||||
if (pbox->y1 > y || pbox->y2 <= y)
|
||||
continue;
|
||||
int real_x1 = x1, real_x2 = x2;
|
||||
|
||||
if (x1 < pbox->x1)
|
||||
x1 = pbox->x1;
|
||||
if (real_x1 < pbox->x1)
|
||||
real_x1 = pbox->x1;
|
||||
|
||||
if (x2 > pbox->x2)
|
||||
x2 = pbox->x2;
|
||||
if (real_x2 > pbox->x2)
|
||||
real_x2 = pbox->x2;
|
||||
|
||||
if (x2 <= x1)
|
||||
continue;
|
||||
if (!glamor_fill(drawable, gc, x1, y, x2 - x1, 1, fallback))
|
||||
goto fail;
|
||||
if (real_x2 > real_x1 && pbox->y1 <= y && pbox->y2 > y) {
|
||||
if (!glamor_fill(drawable, gc, real_x1, y,
|
||||
real_x2 - real_x1, 1, fallback))
|
||||
goto fail;
|
||||
}
|
||||
pbox++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue