summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/arc.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2009-11-20 18:09:10 +0000
committerAlan Hourihane <[email protected]>2009-11-20 21:15:25 +0000
commit910b58039a3980d9857380cf367bdbe2395d791f (patch)
treed7353f35a00bc340795419ff12f28ee79776f91e /src/gallium/state_trackers/vega/arc.c
parent1dbf3642b9c1c37f72e2212ce78056cf8959a957 (diff)
Fix vega compilation.
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;