summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-01 10:01:21 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-01 20:39:08 +0100
commitd09a229e32468c810f5056bfd0043f2fb68038d3 (patch)
treeb9da1cf34030d58d6a03748a0cac65693cbee1f8
parente7a662b92e3012735f7a3d72d4f7860ca61a3810 (diff)
sna/accel: Use the mi*Line routines to convert the line into spans for gpu bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 55dd2cd9..8f3aabc1 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2148,6 +2148,23 @@ sna_poly_line(DrawablePtr drawable, GCPtr gc,
return;
}
+ if (sna_drawable_use_gpu_bo(drawable, &extents)) {
+ DBG(("%s: converting line into spans\n", __FUNCTION__));
+ switch (gc->lineStyle) {
+ case LineSolid:
+ if (gc->lineWidth == 0)
+ miZeroLine(drawable, gc, mode, n, pt);
+ else
+ miWideLine(drawable, gc, mode, n, pt);
+ break;
+ case LineOnOffDash:
+ case LineDoubleDash:
+ miWideDash(drawable, gc, mode, n, pt);
+ break;
+ }
+ return;
+ }
+
fallback:
DBG(("%s: fallback\n", __FUNCTION__));
RegionInit(&region, &extents, 1);