glamor: Fix the coords calculation in glamor_fill.
glamor_fill is only called from internal functions glamor_fillspancs and glamor_polyfillrect. And both functions already add the offset to the coords, so the coords are already relative value, we can't add the offset once again. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
1dca5d7b91
commit
14503fbb81
|
@ -41,14 +41,12 @@ glamor_fill(DrawablePtr drawable,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(drawable);
|
PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(drawable);
|
||||||
int x_off, y_off;
|
|
||||||
glamor_get_drawable_deltas(drawable, dst_pixmap, &x_off, &y_off);
|
|
||||||
|
|
||||||
switch (gc->fillStyle) {
|
switch (gc->fillStyle) {
|
||||||
case FillSolid:
|
case FillSolid:
|
||||||
if (!glamor_solid(dst_pixmap,
|
if (!glamor_solid(dst_pixmap,
|
||||||
x + x_off,
|
x,
|
||||||
y + y_off,
|
y,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
gc->alu,
|
gc->alu,
|
||||||
|
@ -60,24 +58,24 @@ glamor_fill(DrawablePtr drawable,
|
||||||
case FillOpaqueStippled:
|
case FillOpaqueStippled:
|
||||||
if (!glamor_stipple(dst_pixmap,
|
if (!glamor_stipple(dst_pixmap,
|
||||||
gc->stipple,
|
gc->stipple,
|
||||||
x+ x_off,
|
x,
|
||||||
y + y_off,
|
y,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
gc->alu,
|
gc->alu,
|
||||||
gc->planemask,
|
gc->planemask,
|
||||||
gc->fgPixel,
|
gc->fgPixel,
|
||||||
gc->bgPixel,
|
gc->bgPixel,
|
||||||
gc->patOrg.x + x_off,
|
gc->patOrg.x,
|
||||||
gc->patOrg.y + y_off))
|
gc->patOrg.y))
|
||||||
goto fail;
|
goto fail;
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case FillTiled:
|
case FillTiled:
|
||||||
if (!glamor_tile(dst_pixmap,
|
if (!glamor_tile(dst_pixmap,
|
||||||
gc->tile.pixmap,
|
gc->tile.pixmap,
|
||||||
x + x_off,
|
x,
|
||||||
y + y_off,
|
y,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
gc->alu,
|
gc->alu,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user