summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-04 11:48:04 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-04 11:48:04 +0000
commit82b646a42f5a6271c8518ad454f1603714276caf (patch)
treef91586ebcdc960b0718965c8f5ddfae4b5b1cc07 /src/sna/sna_accel.c
parente678cead11b53699694f5b5cf52ff3ea0e08f637 (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r--src/sna/sna_accel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index b8d89d6f..28cdd740 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,