[PATCH 11/13] glamor: use miZeroPolyArc for 0-width arcs

walter harms wharms at bfs.de
Tue May 6 04:12:24 PDT 2014



Am 06.05.2014 00:02, schrieb Keith Packard:
> miPolyArc is a whole lot slower than miZeroPolyArc.
> 
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  glamor/glamor_core.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
> index 9e3d2ea..df60e5d 100644
> --- a/glamor/glamor_core.c
> +++ b/glamor/glamor_core.c
> @@ -292,6 +292,15 @@ glamor_fini_finish_access_shaders(ScreenPtr screen)
>      glDeleteProgram(glamor_priv->finish_access_prog[1]);
>  }
>  
> +static void
> +glamor_poly_arc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
> +{
> +    if (pGC->lineWidth == 0)
> +        miZeroPolyArc(pDraw, pGC, narcs, parcs);
> +    else
> +        miPolyArc(pDraw, pGC, narcs, parcs);
> +}

IMHO that should be done within miPolyArc().

re,
 wh


>  GCOps glamor_gc_ops = {
>      .FillSpans = glamor_fill_spans,
>      .SetSpans = glamor_set_spans,
> @@ -302,7 +311,7 @@ GCOps glamor_gc_ops = {
>      .Polylines = glamor_poly_lines,
>      .PolySegment = glamor_poly_segment,
>      .PolyRectangle = miPolyRectangle,
> -    .PolyArc = miPolyArc,
> +    .PolyArc = glamor_poly_arc,
>      .FillPolygon = miFillPolygon,
>      .PolyFillRect = glamor_poly_fill_rect,
>      .PolyFillArc = miPolyFillArc,


More information about the xorg-devel mailing list