diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-17 00:55:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-17 00:58:02 +0100 |
commit | 17acaf8e232a8bad9bc2c653a9fceb06f0f65f6b (patch) | |
tree | 859c41c3d3e4d0d5dd52bb1f02b3277d3f4710d5 | |
parent | c348b69f66cbe1cafc88396523da9768e1006889 (diff) |
sna: Defer CPU fallback if fb calls into mi
If the fb routine does not access the pixel data directly, but instead
calls into an mi routine, we can defer the readback and possibly avoid
it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 51d51f3c..49bd6047 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2365,6 +2365,14 @@ sna_poly_line(DrawablePtr drawable, GCPtr gc, } fallback: + if (gc->lineWidth) { + if (gc->lineStyle != LineSolid) + miWideDash(drawable, gc, mode, n, pt); + else + miWideLine(drawable, gc, mode, n, pt); + return; + } + DBG(("%s: fallback\n", __FUNCTION__)); region_set(®ion, &extents); region_maybe_clip(®ion, gc->pCompositeClip); @@ -2670,6 +2678,11 @@ sna_poly_segment(DrawablePtr drawable, GCPtr gc, int n, xSegment *seg) } fallback: + if (gc->lineWidth) { + miPolySegment(drawable, gc, n, seg); + return; + } + DBG(("%s: fallback\n", __FUNCTION__)); region_set(®ion, &extents); region_maybe_clip(®ion, gc->pCompositeClip); @@ -2774,6 +2787,11 @@ sna_poly_arc(DrawablePtr drawable, GCPtr gc, int n, xArc *arc) } fallback: + if (gc->lineWidth) { + miPolyArc(drawable, gc, n, arc); + return; + } + region_set(®ion, &extents); region_maybe_clip(®ion, gc->pCompositeClip); if (!RegionNotEmpty(®ion)) @@ -2783,6 +2801,7 @@ fallback: sna_drawable_move_region_to_cpu(drawable, ®ion, true); RegionUninit(®ion); + /* XXX may still fallthrough to miZeroPolyArc */ fbPolyArc(drawable, gc, n, arc); } |