From b7ea22f168da8617d57cf4c2a534ae0780d60fb7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 27 Aug 2023 09:39:59 -0400 Subject: [PATCH] Drop unused code Nobody is calling gsk_contour_get_start_end, so drop this internal API. --- gsk/gskcontour.c | 58 ----------------------------------------- gsk/gskcontourprivate.h | 3 --- 2 files changed, 61 deletions(-) diff --git a/gsk/gskcontour.c b/gsk/gskcontour.c index fc30fbeb58..99c3407daa 100644 --- a/gsk/gskcontour.c +++ b/gsk/gskcontour.c @@ -50,9 +50,6 @@ struct _GskContourClass gboolean (* get_stroke_bounds) (const GskContour *contour, const GskStroke *stroke, GskBoundingBox *bounds); - void (* get_start_end) (const GskContour *self, - graphene_point_t *start, - graphene_point_t *end); gboolean (* foreach) (const GskContour *contour, float tolerance, GskPathForeachFunc func, @@ -410,20 +407,6 @@ gsk_standard_contour_get_stroke_bounds (const GskContour *contour, return TRUE; } -static void -gsk_standard_contour_get_start_end (const GskContour *contour, - graphene_point_t *start, - graphene_point_t *end) -{ - const GskStandardContour *self = (const GskStandardContour *) contour; - - if (start) - *start = self->points[0]; - - if (end) - *end = self->points[self->n_points - 1]; -} - static int gsk_standard_contour_get_winding (const GskContour *contour, const graphene_point_t *point) @@ -1018,7 +1001,6 @@ static const GskContourClass GSK_STANDARD_CONTOUR_CLASS = gsk_contour_print_default, gsk_standard_contour_get_bounds, gsk_standard_contour_get_stroke_bounds, - gsk_standard_contour_get_start_end, gsk_standard_contour_foreach, gsk_standard_contour_reverse, gsk_standard_contour_get_winding, @@ -1144,20 +1126,6 @@ gsk_circle_contour_get_stroke_bounds (const GskContour *contour, return TRUE; } -static void -gsk_circle_contour_get_start_end (const GskContour *contour, - graphene_point_t *start, - graphene_point_t *end) -{ - const GskCircleContour *self = (const GskCircleContour *) contour; - - if (start) - *start = GRAPHENE_POINT_INIT (self->center.x + self->radius, self->center.y); - - if (end) - *end = GRAPHENE_POINT_INIT (self->center.x + self->radius, self->center.y); -} - static gboolean gsk_circle_contour_foreach (const GskContour *contour, float tolerance, @@ -1463,7 +1431,6 @@ static const GskContourClass GSK_CIRCLE_CONTOUR_CLASS = gsk_contour_print_default, gsk_circle_contour_get_bounds, gsk_circle_contour_get_stroke_bounds, - gsk_circle_contour_get_start_end, gsk_circle_contour_foreach, gsk_circle_contour_reverse, gsk_circle_contour_get_winding, @@ -1554,22 +1521,6 @@ gsk_rounded_rect_contour_get_stroke_bounds (const GskContour *contour, return TRUE; } -static void -gsk_rounded_rect_contour_get_start_end (const GskContour *contour, - graphene_point_t *start, - graphene_point_t *end) -{ - const GskRoundedRectContour *self = (const GskRoundedRectContour *) contour; - - if (start) - *start = GRAPHENE_POINT_INIT (self->rect.bounds.origin.x + self->rect.corner[GSK_CORNER_TOP_LEFT].width, - self->rect.bounds.origin.y); - - if (end) - *end = GRAPHENE_POINT_INIT (self->rect.bounds.origin.x + self->rect.corner[GSK_CORNER_TOP_LEFT].width, - self->rect.bounds.origin.y); -} - static void get_rounded_rect_points (const GskRoundedRect *rect, graphene_point_t *pts) @@ -1843,7 +1794,6 @@ static const GskContourClass GSK_ROUNDED_RECT_CONTOUR_CLASS = gsk_contour_print_default, gsk_rounded_rect_contour_get_bounds, gsk_rounded_rect_contour_get_stroke_bounds, - gsk_rounded_rect_contour_get_start_end, gsk_rounded_rect_contour_foreach, gsk_rounded_rect_contour_reverse, gsk_rounded_rect_contour_get_winding, @@ -1949,14 +1899,6 @@ gsk_contour_foreach (const GskContour *self, return self->klass->foreach (self, tolerance, func, user_data); } -void -gsk_contour_get_start_end (const GskContour *self, - graphene_point_t *start, - graphene_point_t *end) -{ - self->klass->get_start_end (self, start, end); -} - int gsk_contour_get_winding (const GskContour *self, const graphene_point_t *point) diff --git a/gsk/gskcontourprivate.h b/gsk/gskcontourprivate.h index 63e9161bc2..73ffef8c5d 100644 --- a/gsk/gskcontourprivate.h +++ b/gsk/gskcontourprivate.h @@ -57,9 +57,6 @@ gboolean gsk_contour_foreach (const GskContou float tolerance, GskPathForeachFunc func, gpointer user_data); -void gsk_contour_get_start_end (const GskContour *self, - graphene_point_t *start, - graphene_point_t *end); int gsk_contour_get_winding (const GskContour *self, const graphene_point_t *point); gsize gsk_contour_get_n_ops (const GskContour *self);