[gtk/wip/matthiasc/lottie-stroke: 58/60] cleanups




commit d16786600b2ba28cd801128e8d4b42a5bb26b81f
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 30 02:30:03 2020 -0500

    cleanups

 gsk/gskpathstroke.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gsk/gskpathstroke.c b/gsk/gskpathstroke.c
index 06f9a668c5..77a1d29813 100644
--- a/gsk/gskpathstroke.c
+++ b/gsk/gskpathstroke.c
@@ -17,6 +17,8 @@
  * Authors: Matthias Clasen <mclasen redhat com>
  */
 
+#define STROKE_DEBUG 1
+
 #include "config.h"
 
 #include "gskpathprivate.h"
@@ -833,7 +835,7 @@ path_op_data_new (GskPathOperation        op,
     d->pts[i] = pts[i];
   d->n_pts = n_pts;
 
-#if 0
+#if STROKE_DEBUG
   /* detect uninitialized values */
   for (i = 0; i < n_pts; i++)
     d->l[i].x = d->l[i].y = d->r[i].x = d->r[i].y = NAN;
@@ -850,7 +852,6 @@ path_op_data_new (GskPathOperation        op,
 typedef struct
 {
   GList *ops;
-  GskStroke *stroke;
   graphene_point_t *start;
 } AddOpData;
 
@@ -912,13 +913,11 @@ add_op_to_list (GskPathOperation        op,
 
 static GList *
 contour_to_ops (const GskContour *contour,
-                GskStroke        *stroke,
                 graphene_point_t *start)
 {
   AddOpData data;
 
   data.ops = NULL;
-  data.stroke = stroke;
   data.start = start;
 
   gsk_contour_foreach (contour, GSK_PATH_TOLERANCE_DEFAULT, add_op_to_list, &data);
@@ -926,8 +925,6 @@ contour_to_ops (const GskContour *contour,
   return g_list_reverse (data.ops);
 }
 
-#define STROKE_DEBUG 1
-
 #ifdef STROKE_DEBUG
 enum {
   STROKE_DEBUG_LEFT_CURVES         = 1 << 0,
@@ -1075,7 +1072,7 @@ gsk_contour_to_stroke (const GskContour *contour,
   gboolean draw_caps;
   graphene_point_t start;
 
-  ops = contour_to_ops (contour, stroke, &start);
+  ops = contour_to_ops (contour, &start);
 
   /* Compute offset start and end points */
   for (l = ops; l; l = l->next)
@@ -1122,6 +1119,7 @@ gsk_contour_to_stroke (const GskContour *contour,
         }
     }
 
+#ifdef STROKE_DEBUG
   for (l = ops; l; l = l->next)
     {
       int i;
@@ -1140,6 +1138,7 @@ gsk_contour_to_stroke (const GskContour *contour,
           g_assert_true (!isnan (op->angle[i]));
         }
     }
+#endif
 
   draw_caps = TRUE;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]