[PATCH 1/2] Remove some unused functions
Uli Schlachter
psychon at znc.in
Tue May 1 05:38:51 PDT 2012
All of these are unused since af9fbd176b145f0424 "Introduce a new compositor
architecture". Since no one complained yet, I guess that means that we don't
need these any more. :-)
This was noticed while looking into the build log provided by
http://lists.cairographics.org/archives/cairo/2012-April/022993.html
Signed-off-by: Uli Schlachter <psychon at znc.in>
---
src/cairo-botor-scan-converter.c | 36 -------------------------------
src/cairo-path-stroke-polygon.c | 44 --------------------------------------
2 files changed, 80 deletions(-)
diff --git a/src/cairo-botor-scan-converter.c b/src/cairo-botor-scan-converter.c
index 2729463..515305b 100644
--- a/src/cairo-botor-scan-converter.c
+++ b/src/cairo-botor-scan-converter.c
@@ -2128,42 +2128,6 @@ 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);
-}
-
-static cairo_status_t
-_cairo_botor_scan_converter_add_polygon (void *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-path-stroke-polygon.c b/src/cairo-path-stroke-polygon.c
index 7b485a1..919e7db 100644
--- a/src/cairo-path-stroke-polygon.c
+++ b/src/cairo-path-stroke-polygon.c
@@ -232,50 +232,6 @@ join_is_clockwise (const cairo_stroke_face_t *in,
return _cairo_slope_compare (&in->dev_vector, &out->dev_vector) < 0;
}
-static cairo_int64_t
-distance_from_face (const cairo_stroke_face_t *face,
- const cairo_point_t *p,
- cairo_bool_t negate)
-{
- int32_t dx = (p->x - face->point.x);
- int32_t dy = (p->y - face->point.y);
- cairo_int64_t d;
-
- d = _cairo_int64_sub (_cairo_int32x32_64_mul (dx, face->dev_vector.dy),
- _cairo_int32x32_64_mul (dy, face->dev_vector.dx));
- if (negate)
- d = _cairo_int64_negate (d);
- return d;
-}
-
-static cairo_int64_t
-distance_along_face (const cairo_stroke_face_t *face,
- const cairo_point_t *p)
-{
- int32_t dx = (p->x - face->point.x);
- int32_t dy = (p->y - face->point.y);
- return _cairo_int64_add (_cairo_int32x32_64_mul (dx, face->dev_vector.dx),
- _cairo_int32x32_64_mul (dy, face->dev_vector.dy));
-}
-
-static void
-compute_inner_joint (cairo_point_t *p1, cairo_int64_t d_p1,
- const cairo_point_t *p2, cairo_int64_t d_p2,
- cairo_int64_t half_line_width)
-{
- int32_t dx = p2->x - p1->x;
- int32_t dy = p2->y - p1->y;
-
- half_line_width = _cairo_int64_sub (half_line_width, d_p1);
- d_p2 = _cairo_int64_sub (d_p2, d_p1);
-
- p1->x += _cairo_int_96by64_32x64_divrem (_cairo_int64x32_128_mul (half_line_width, dx),
- d_p2).quo;
-
- p1->y += _cairo_int_96by64_32x64_divrem (_cairo_int64x32_128_mul (half_line_width, dy),
- d_p2).quo;
-}
-
static void
inner_join (struct stroker *stroker,
const cairo_stroke_face_t *in,
--
1.7.10
--------------070802020000050305050502
Content-Type: text/x-diff;
name="0002-Remove-some-dead-code.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0002-Remove-some-dead-code.patch"
More information about the cairo
mailing list