diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 18:48:17 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 18:54:08 +0000 |
commit | 855c45c65a69d34ad32a97a5fc54dd09d40d3e26 (patch) | |
tree | a7589c76a66d003e002fbdaaf4b7d0df50927e9f | |
parent | c3fe42cde70a06a9a9a6190934df5cddb41d2f5f (diff) |
sna: Enable clipping for mi FillSpans gpu callback
The mi routines do not ensure that their output is suitably constrained
to the clip extents, so we must run it through the clipper.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 01b44a01..cadd1c96 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4389,11 +4389,15 @@ sna_fill_spans__gpu(DrawablePtr drawable, GCPtr gc, int n, if (n == 0) return; + /* The mi routines do not attempt to keep the spans it generates + * within the clip, so we must run them through the clipper. + */ + if (gc_is_solid(gc, &color)) { sna_fill_spans_blt(drawable, - data->bo, data->damage, + data->bo, NULL, gc, color, n, pt, width, sorted, - &data->region.extents, data->flags & 2); + &data->region.extents, 2); } else { /* Try converting these to a set of rectangles instead */ xRectangle *rect; @@ -4414,16 +4418,14 @@ sna_fill_spans__gpu(DrawablePtr drawable, GCPtr gc, int n, if (gc->fillStyle == FillTiled) { sna_poly_fill_rect_tiled_blt(drawable, - data->bo, data->damage, + data->bo, NULL, gc, n, rect, - &data->region.extents, - data->flags & 2); + &data->region.extents, 2); } else { sna_poly_fill_rect_stippled_blt(drawable, - data->bo, data->damage, + data->bo, NULL, gc, n, rect, - &data->region.extents, - data->flags & 2); + &data->region.extents, 2); } free (rect); } |