[PATCH 14/20] glamor: stub out lines
Keith Packard
keithp at keithp.com
Tue Mar 18 22:09:48 PDT 2014
Use mi line code for now
Signed-off-by: Keith Packard <keithp at keithp.com>
---
glamor/glamor_core.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
index f350746..1536c54 100644
--- a/glamor/glamor_core.c
+++ b/glamor/glamor_core.c
@@ -412,6 +412,25 @@ glamor_stipple(PixmapPtr pixmap, PixmapPtr stipple,
return FALSE;
}
+static void
+glamor_fallback_poly_line(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt)
+{
+ void (*line) (DrawablePtr, GCPtr, int mode, int npt, DDXPointPtr ppt);
+
+ if (pGC->lineWidth == 0) {
+ if (pGC->lineStyle != LineSolid)
+ line = miZeroDashLine;
+ else
+ line = miZeroLine;
+ } else {
+ if (pGC->lineStyle != LineSolid)
+ line = miWideDash;
+ else
+ line = miWideLine;
+ }
+ (*line) (pDrawable, pGC, mode, npt, ppt);
+}
+
GCOps glamor_gc_ops = {
.FillSpans = glamor_fillspans,
.SetSpans = glamor_setspans,
@@ -419,8 +438,8 @@ GCOps glamor_gc_ops = {
.CopyArea = glamor_copyarea,
.CopyPlane = glamor_copyplane,
.PolyPoint = glamor_poly_point,
- .Polylines = glamor_poly_lines,
- .PolySegment = glamor_poly_segment,
+ .Polylines = glamor_fallback_poly_line,
+ .PolySegment = miPolySegment,
.PolyRectangle = miPolyRectangle,
.PolyArc = miPolyArc,
.FillPolygon = miFillPolygon,
--
1.9.0
More information about the xorg-devel
mailing list