Drop tolerance from gsk_contour_foreach

There is no decomposition going on for any contours,
and the tolerance argument is entirely unused.
Decomposition and tolerance is handled entirely
in gskpath.c by its trampoline.
This commit is contained in:
Matthias Clasen 2023-08-28 20:51:10 -04:00
parent 5721c3cb8f
commit 11b219bc61
3 changed files with 5 additions and 12 deletions

View File

@ -51,7 +51,6 @@ struct _GskContourClass
const GskStroke *stroke,
GskBoundingBox *bounds);
gboolean (* foreach) (const GskContour *contour,
float tolerance,
GskPathForeachFunc func,
gpointer user_data);
GskContour * (* reverse) (const GskContour *contour);
@ -169,7 +168,7 @@ convert_to_standard_contour (const GskContour *contour)
GskPathBuilder *builder;
builder = gsk_path_builder_new ();
gsk_contour_foreach (contour, 0.5, add_segment, builder);
gsk_contour_foreach (contour, add_segment, builder);
return gsk_path_builder_free_to_path (builder);
}
@ -233,7 +232,7 @@ static void
gsk_contour_print_default (const GskContour *contour,
GString *string)
{
gsk_contour_foreach (contour, 0.5, foreach_print, string);
gsk_contour_foreach (contour, foreach_print, string);
}
/* }}} */
@ -295,7 +294,6 @@ gsk_standard_contour_get_size (const GskContour *contour)
static gboolean
gsk_standard_contour_foreach (const GskContour *contour,
float tolerance,
GskPathForeachFunc func,
gpointer user_data)
{
@ -1151,7 +1149,6 @@ gsk_circle_contour_get_stroke_bounds (const GskContour *contour,
static gboolean
gsk_circle_contour_foreach (const GskContour *contour,
float tolerance,
GskPathForeachFunc func,
gpointer user_data)
{
@ -1529,7 +1526,6 @@ gsk_rect_contour_get_stroke_bounds (const GskContour *contour,
static gboolean
gsk_rect_contour_foreach (const GskContour *contour,
float tolerance,
GskPathForeachFunc func,
gpointer user_data)
{
@ -2079,7 +2075,6 @@ get_rounded_rect_points (const GskRoundedRect *rect,
static gboolean
gsk_rounded_rect_contour_foreach (const GskContour *contour,
float tolerance,
GskPathForeachFunc func,
gpointer user_data)
{
@ -2211,7 +2206,7 @@ gsk_rounded_rect_contour_init_curve (const GskContour *contour,
data.idx = idx;
data.count = 0;
gsk_contour_foreach (contour, 0.5, init_curve_cb, &data);
gsk_contour_foreach (contour, init_curve_cb, &data);
}
static void
@ -2430,11 +2425,10 @@ gsk_contour_get_stroke_bounds (const GskContour *self,
gboolean
gsk_contour_foreach (const GskContour *self,
float tolerance,
GskPathForeachFunc func,
gpointer user_data)
{
return self->klass->foreach (self, tolerance, func, user_data);
return self->klass->foreach (self, func, user_data);
}
int

View File

@ -55,7 +55,6 @@ gboolean gsk_contour_get_stroke_bounds (const GskContou
const GskStroke *stroke,
GskBoundingBox *bounds);
gboolean gsk_contour_foreach (const GskContour *self,
float tolerance,
GskPathForeachFunc func,
gpointer user_data);
int gsk_contour_get_winding (const GskContour *self,

View File

@ -810,7 +810,7 @@ gsk_path_foreach_with_tolerance (GskPath *self,
for (i = 0; i < self->n_contours; i++)
{
if (!gsk_contour_foreach (self->contours[i], tolerance, func, user_data))
if (!gsk_contour_foreach (self->contours[i], func, user_data))
return FALSE;
}