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>
This commit is contained in:
Chris Wilson 2011-10-01 10:01:21 +01:00
parent e7a662b92e
commit d09a229e32
1 changed files with 17 additions and 0 deletions

View File

@ -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);