diff options
author | Alan Hourihane <[email protected]> | 2009-11-20 18:09:10 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2009-11-20 21:15:25 +0000 |
commit | 910b58039a3980d9857380cf367bdbe2395d791f (patch) | |
tree | d7353f35a00bc340795419ff12f28ee79776f91e /src/gallium/state_trackers/vega/bezier.c | |
parent | 1dbf3642b9c1c37f72e2212ce78056cf8959a957 (diff) |
Fix vega compilation.
Diffstat (limited to 'src/gallium/state_trackers/vega/bezier.c')
-rw-r--r-- | src/gallium/state_trackers/vega/bezier.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vega/bezier.c b/src/gallium/state_trackers/vega/bezier.c index 39a7ade0161..0d5504004cc 100644 --- a/src/gallium/state_trackers/vega/bezier.c +++ b/src/gallium/state_trackers/vega/bezier.c @@ -255,7 +255,9 @@ 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 +332,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 +407,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); |