From 82b646a42f5a6271c8518ad454f1603714276caf Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 4 Nov 2013 11:48:04 +0000 Subject: [PATCH] sna: Only use the simple stipple upload path if wholly contained 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 --- src/sna/sna_accel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index b8d89d6..28cdd74 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -13648,7 +13648,9 @@ sna_poly_fill_rect_stippled_blt(DrawablePtr drawable, 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, -- 2.7.4