glamor_fill/tile: Fixed a tileX/tileY calculation bug.
The previous's calculation is incorrect, now fix it and then we don't need to fallback at glamor_tile. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Tested-by: Peng Li <peng.li@intel.com>
This commit is contained in:
parent
39d9e6c693
commit
91891b3711
|
|
@ -31,7 +31,6 @@
|
||||||
*
|
*
|
||||||
* GC fill implementation, based loosely on fb_fill.c
|
* GC fill implementation, based loosely on fb_fill.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
glamor_fill(DrawablePtr drawable,
|
glamor_fill(DrawablePtr drawable,
|
||||||
GCPtr gc, int x, int y, int width, int height, Bool fallback)
|
GCPtr gc, int x, int y, int width, int height, Bool fallback)
|
||||||
|
|
@ -74,8 +73,8 @@ glamor_fill(DrawablePtr drawable,
|
||||||
height,
|
height,
|
||||||
gc->alu,
|
gc->alu,
|
||||||
gc->planemask,
|
gc->planemask,
|
||||||
drawable->x + x + off_x - gc->patOrg.x,
|
x - drawable->x - gc->patOrg.x,
|
||||||
drawable->y + y + off_y - gc->patOrg.y))
|
y - drawable->y - gc->patOrg.y))
|
||||||
goto fail;
|
goto fail;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,13 +124,6 @@ glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
|
||||||
if (src_pixmap_priv == NULL || dst_pixmap_priv == NULL)
|
if (src_pixmap_priv == NULL || dst_pixmap_priv == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (((tile_x != 0) && (tile_x + width > tile->drawable.width))
|
|
||||||
|| ((tile_y != 0)
|
|
||||||
&& (tile_y + height > tile->drawable.height))) {
|
|
||||||
/* XXX We can recreate a new pixmap here to avoid partial tiling. */
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (glamor_priv->tile_prog == 0) {
|
if (glamor_priv->tile_prog == 0) {
|
||||||
glamor_fallback("Tiling unsupported\n");
|
glamor_fallback("Tiling unsupported\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue