summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/arc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vega/arc.c')
-rw-r--r--src/gallium/state_trackers/vega/arc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vega/arc.c b/src/gallium/state_trackers/vega/arc.c
index e74c7f03345..8b04d21ea76 100644
--- a/src/gallium/state_trackers/vega/arc.c
+++ b/src/gallium/state_trackers/vega/arc.c
@@ -528,6 +528,7 @@ static INLINE int num_beziers_needed(struct arc *arc)
double threshold = 0.05;
VGboolean found = VG_FALSE;
int n = 1;
+ int i;
double min_eta, max_eta;
min_eta = MIN2(arc->eta1, arc->eta2);
@@ -538,7 +539,7 @@ static INLINE int num_beziers_needed(struct arc *arc)
if (d_eta <= 0.5 * M_PI) {
double eta_b = min_eta;
found = VG_TRUE;
- for (int i = 0; found && (i < n); ++i) {
+ for (i = 0; found && (i < n); ++i) {
double etaA = eta_b;
eta_b += d_eta;
found = (estimate_error(arc, etaA, eta_b) <= threshold);
@@ -554,6 +555,7 @@ static void arc_to_beziers(struct arc *arc,
struct arc_cb cb,
struct matrix *matrix)
{
+ int i;
int n = 1;
double d_eta, eta_b, cos_eta_b,
sin_eta_b, a_cos_eta_b, b_sin_eta_b, a_sin_eta_b,
@@ -607,7 +609,7 @@ static void arc_to_beziers(struct arc *arc,
t = tan(0.5 * d_eta);
alpha = sin(d_eta) * (sqrt(4 + 3 * t * t) - 1) / 3;
- for (int i = 0; i < n; ++i) {
+ for (i = 0; i < n; ++i) {
struct bezier bezier;
double xA = x_b;
double yA = y_b;