diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-03 22:51:24 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-03 22:51:24 +0000 |
commit | 5b21838471651a59d3e425c05a389c3f9196e21d (patch) | |
tree | 8dbae84996a089692dbfcfb26c82c808c04b192f | |
parent | 2174f840158aa9cfa370ade38be28f8dc8e4b526 (diff) |
sna: Compute the correct extents for the PolyRectangle
Otherwise we may leave one behind...
A regression from the introduction of sna_poly_rectangles:
40af32a0e9ed971a1f2c2a45266f32016bda7ed3 (sna: Execute blits directly
for PolyRectangle)
Reported-by: Matti Hamalainen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42568
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index e0bf47be..bea77887 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4916,7 +4916,7 @@ sna_poly_rectangle_extents(DrawablePtr drawable, GCPtr gc, box.y2 = box.y1 + r->height; while (--n) - box32_add_rect(&box, r++); + box32_add_rect(&box, ++r); box.x2++; box.y2++; @@ -4954,8 +4954,8 @@ sna_poly_rectangle_blt(DrawablePtr drawable, &&zero_clipped, }; - DBG(("%s: alu=%d, width=%d, fg=%08lx, damge=%p, clipped?=%d\n", - __FUNCTION__, gc->alu, gc->lineWidth, gc->fgPixel, damage, clipped)); + DBG(("%s: n=%d, alu=%d, width=%d, fg=%08lx, damge=%p, clipped?=%d\n", + __FUNCTION__, n, gc->alu, gc->lineWidth, gc->fgPixel, damage, clipped)); if (!sna_fill_init_blt(&fill, sna, pixmap, bo, gc->alu, gc->fgPixel)) return FALSE; @@ -4969,6 +4969,9 @@ zero: do { xRectangle rr = *r++; + + DBG(("%s - zero : r[%d] = (%d, %d) x (%d, %d)\n", __FUNCTION__, + n, rr.x, rr.y, rr.width, rr.height)); rr.x += dx; rr.y += dy; @@ -5029,6 +5032,9 @@ zero_clipped: const BoxRec *c; do { xRectangle rr = *r++; + + DBG(("%s - zero, clipped complex: r[%d] = (%d, %d) x (%d, %d)\n", __FUNCTION__, + n, rr.x, rr.y, rr.width, rr.height)); rr.x += drawable->x; rr.y += drawable->y; @@ -5087,6 +5093,8 @@ zero_clipped: } else { do { xRectangle rr = *r++; + DBG(("%s - zero, clip: r[%d] = (%d, %d) x (%d, %d)\n", __FUNCTION__, + n, rr.x, rr.y, rr.width, rr.height)); rr.x += drawable->x; rr.y += drawable->y; |