diff options
Diffstat (limited to 'src/gallium/state_trackers/vega/bezier.c')
-rw-r--r-- | src/gallium/state_trackers/vega/bezier.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vega/bezier.c b/src/gallium/state_trackers/vega/bezier.c index 39a7ade0161..5769e8ea868 100644 --- a/src/gallium/state_trackers/vega/bezier.c +++ b/src/gallium/state_trackers/vega/bezier.c @@ -255,7 +255,8 @@ static enum shift_result good_offset(const struct bezier *b1, const float max_dist_line = threshold*offset*offset; const float max_dist_normal = threshold*offset; const float spacing = 0.25; - for (float i = spacing; i < 0.99; i += spacing) { + float i; + for (i = spacing; i < 0.99; i += spacing) { float p1[2],p2[2], d, l; float normal[2]; bezier_point_at(b1, i, p1); @@ -330,6 +331,7 @@ static enum shift_result shift(const struct bezier *orig, struct bezier *shifted, float offset, float threshold) { + int i; int map[4]; VGboolean p1_p2_equal = (orig->x1 == orig->x2 && orig->y1 == orig->y2); VGboolean p2_p3_equal = (orig->x2 == orig->x3 && orig->y2 == orig->y3); @@ -404,7 +406,7 @@ static enum shift_result shift(const struct bezier *orig, points_shifted[0][0] = points[0][0] + offset * prev_normal[0]; points_shifted[0][1] = points[0][1] + offset * prev_normal[1]; - for (int i = 1; i < np - 1; ++i) { + for (i = 1; i < np - 1; ++i) { float normal_sum[2], r; float next_normal[2]; compute_pt_normal(points[i], points[i + 1], next_normal); |