[cairo] [PATCH 02/72] core: reintroduce bot-scan-converter functions

Bryce Harrington bryce at osg.samsung.com
Wed Jan 13 17:09:06 PST 2016


On Tue, Dec 29, 2015 at 10:16:40AM +0100, Enrico Weigelt, metux IT consult wrote:
> These functions have been accidentially removed by commit:
> 494cfd7eb9d994a5e2024e299986e66a3ef9a562.
> 
> They're still needed by the DRM backend.
> (will be used by subsequent patches)
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> Cc: Uli Schlachter <psychon at znc.in>

Pushed:
To ssh://git.cairographics.org/git/cairo
   adb896e..b371b01  master -> master


> ---
>  src/cairo-botor-scan-converter.c | 36 ++++++++++++++++++++++++++++++++++++
>  src/cairo-spans-private.h        |  4 ++++
>  2 files changed, 40 insertions(+)
> 
> diff --git a/src/cairo-botor-scan-converter.c b/src/cairo-botor-scan-converter.c
> index 515305b..e23aefe 100644
> --- a/src/cairo-botor-scan-converter.c
> +++ b/src/cairo-botor-scan-converter.c
> @@ -2128,6 +2128,42 @@ botor_add_edge (cairo_botor_scan_converter_t *self,
>      return CAIRO_STATUS_SUCCESS;
>  }
>  
> +static cairo_status_t
> +_cairo_botor_scan_converter_add_edge (void		*converter,
> +				      const cairo_point_t *p1,
> +				      const cairo_point_t *p2,
> +				      int top, int bottom,
> +				      int dir)
> +{
> +    cairo_botor_scan_converter_t *self = converter;
> +    cairo_edge_t edge;
> +
> +    edge.line.p1 = *p1;
> +    edge.line.p2 = *p2;
> +    edge.top = top;
> +    edge.bottom = bottom;
> +    edge.dir = dir;
> +
> +    return botor_add_edge (self, &edge);
> +}
> +
> +cairo_status_t
> +_cairo_botor_scan_converter_add_polygon (cairo_botor_scan_converter_t *converter,
> +					 const cairo_polygon_t *polygon)
> +{
> +    cairo_botor_scan_converter_t *self = converter;
> +    cairo_status_t status;
> +    int i;
> +
> +    for (i = 0; i < polygon->num_edges; i++) {
> +	status = botor_add_edge (self, &polygon->edges[i]);
> +	if (unlikely (status))
> +	    return status;
> +    }
> +
> +    return CAIRO_STATUS_SUCCESS;
> +}
> +
>  static void
>  _cairo_botor_scan_converter_destroy (void *converter)
>  {
> diff --git a/src/cairo-spans-private.h b/src/cairo-spans-private.h
> index b158f4d..653183f 100644
> --- a/src/cairo-spans-private.h
> +++ b/src/cairo-spans-private.h
> @@ -168,6 +168,10 @@ _cairo_botor_scan_converter_init (cairo_botor_scan_converter_t *self,
>  				  const cairo_box_t *extents,
>  				  cairo_fill_rule_t fill_rule);
>  
> +cairo_private cairo_status_t
> +_cairo_botor_scan_converter_add_polygon (cairo_botor_scan_converter_t *converter,
> +					const cairo_polygon_t *polygon);
> +
>  /* cairo-spans.c: */
>  
>  cairo_private cairo_scan_converter_t *
> -- 
> 2.6.4.442.g545299f
> 
> -- 
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list