If the stipple box is outside of the stipple pixmap, we need to
carefully upload the stipple using the modulus operation.
Buzilla: https://bugs.launchpad.net/bugs/1247785
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
gc, n, rect,
extents, clipped);
- if (extents->x2 - gc->patOrg.x - drawable->x <= stipple->drawable.width &&
+ if (extents->x1 - gc->patOrg.x - drawable->x >= 0 &&
+ extents->x2 - gc->patOrg.x - drawable->x <= stipple->drawable.width &&
+ extents->y1 - gc->patOrg.y - drawable->y >= 0 &&
extents->y2 - gc->patOrg.y - drawable->y <= stipple->drawable.height) {
if (stipple->drawable.width <= 8 && stipple->drawable.height <= 8)
return sna_poly_fill_rect_stippled_8x8_blt(drawable, bo, damage,