st/egl: Remove.
[mesa.git] / src / gallium / state_trackers / vega / arc.c
index e74c7f033456fbc8a38e073647509aa1cf153219..65a985fbbbf29339436255f5b5d54eafcab95a65 100644 (file)
@@ -33,8 +33,7 @@
 #include "path.h"
 
 #include "util/u_debug.h"
-
-#include <math.h>
+#include "util/u_math.h"
 
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
@@ -537,8 +536,9 @@ static INLINE int num_beziers_needed(struct arc *arc)
       double d_eta = (max_eta - min_eta) / n;
       if (d_eta <= 0.5 * M_PI) {
          double eta_b = min_eta;
+         int i;
          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 +554,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 +608,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;