[cairo] [PATCH 02/41] core: reintroduce bot-scan-converter functions
Uli Schlachter
psychon at znc.in
Fri Dec 11 08:38:20 PST 2015
Am 10.12.2015 um 23:16 schrieb Enrico Weigelt, metux IT consult:
> These functions have been accidentially removed by commit:
> 494cfd7eb9d994a5e2024e299986e66a3ef9a562.
>
> They're still needed by the DRM backend.
Uhm, where? Git grep doesn't find anything.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
> ---
> 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 *
>
--
A normal person is just someone you don't know well enough yet.
- Nettie Wiebe
More information about the cairo
mailing list