[PATCH 14/20] glamor: stub out lines

Markus Wick markus at selfnet.de
Wed Mar 19 07:53:04 PDT 2014


I think this functions are worth to reimplement. eg horizontal lines are 
used a lot and very slow on mi.
How are the interpolation requirement for a line? Is it possible to 
achive them with an opengl quad?

Am 2014-03-19 06:09, schrieb Keith Packard:
> 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,


More information about the xorg-devel mailing list