diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-01 14:30:14 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-01 14:30:14 +0000 |
commit | 5da329735ca79517a326aee002685bf33e8db861 (patch) | |
tree | 13aa081e3a2a58717fd19af5160119c8f56d55c2 /src/sna/sna_accel.c | |
parent | 0d93b0ef343a635512c3835c797c469c17a7b584 (diff) |
sna: Process all clip boxes when rastering segments
The macro still had buried returns which were no longer valid after the
translation to handle clipping. They needed to be breaks from the inner
most loops to the outer clip box instead.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70802
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.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 93231db9..ffb61170 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -9958,10 +9958,14 @@ sna_poly_rectangle_extents(DrawablePtr drawable, GCPtr gc, } else zero = true; + DBG(("%s: unclipped original extents: (%d, %d), (%d, %d)\n", + __FUNCTION__, box.x1, box.y1, box.x2, box.y2)); clipped = box32_trim_and_translate(&box, drawable, gc); if (!box32_to_box16(&box, out)) return 0; + DBG(("%s: extents: (%d, %d), (%d, %d), clipped? %d\n", + __FUNCTION__, out->x1, out->y1, out->x2, out->y2, clipped)); return 1 | clipped << 1 | zero << 2; } @@ -10476,7 +10480,7 @@ sna_poly_rectangle(DrawablePtr drawable, GCPtr gc, int n, xRectangle *r) goto fallback; } - DBG(("%s: fill=_%d [%d], line=%d [%d], join=%d [%d], mask=%lu [%d]\n", + DBG(("%s: fill=%d [%d], line=%d [%d], join=%d [%d], mask=%lu [%d]\n", __FUNCTION__, gc->fillStyle, gc->fillStyle == FillSolid, gc->lineStyle, gc->lineStyle == LineSolid, @@ -10506,12 +10510,19 @@ sna_poly_rectangle(DrawablePtr drawable, GCPtr gc, int n, xRectangle *r) } fallback: - DBG(("%s: fallback\n", __FUNCTION__)); + DBG(("%s: fallback, clip=%ldx[(%d, %d), (%d, %d)]\n", __FUNCTION__, + (long)RegionNumRects(gc->pCompositeClip), + gc->pCompositeClip->extents.x1, gc->pCompositeClip->extents.y1, + gc->pCompositeClip->extents.x2, gc->pCompositeClip->extents.y2)); region.data = NULL; if (!region_maybe_clip(®ion, gc->pCompositeClip)) return; + DBG(("%s: CPU region=%ldx[(%d, %d), (%d, %d)]\n", __FUNCTION__, + (long)RegionNumRects(®ion), + region.extents.x1, region.extents.y1, + region.extents.x2, region.extents.y2)); if (!sna_gc_move_to_cpu(gc, drawable, ®ion)) goto out; if (!sna_drawable_move_region_to_cpu(drawable, ®ion, @@ -14988,8 +14999,17 @@ sna_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable) if (changes & (GCClipMask|GCSubwindowMode) || drawable->serialNumber != (gc->serialNumber & DRAWABLE_SERIAL_BITS) || - (gc->clientClipType != CT_NONE && (changes & (GCClipXOrigin | GCClipYOrigin)))) + (gc->clientClipType != CT_NONE && (changes & (GCClipXOrigin | GCClipYOrigin)))) { + DBG(("%s: recomputing clip\n", __FUNCTION__)); miComputeCompositeClip(gc, drawable); + DBG(("%s: composite clip=%ldx[(%d, %d), (%d, %d)]\n", + __FUNCTION__, + (long)RegionNumRects(gc->pCompositeClip), + gc->pCompositeClip->extents.x1, + gc->pCompositeClip->extents.y1, + gc->pCompositeClip->extents.x2, + gc->pCompositeClip->extents.y2)); + } sna_gc(gc)->changes |= changes; } |