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




commit d35bfb486542dc72c2204f83446baf793684562a
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 30 02:26:46 2020 -0500

    cleanups

 gsk/gskpathstroke.c | 69 -----------------------------------------------------
 1 file changed, 69 deletions(-)
---
diff --git a/gsk/gskpathstroke.c b/gsk/gskpathstroke.c
index c08d7a9bb3..06f9a668c5 100644
--- a/gsk/gskpathstroke.c
+++ b/gsk/gskpathstroke.c
@@ -575,29 +575,6 @@ op_to_string (GskPathOperation op)
   const char *names[] = { "MOVE", "CLOSE", "LINE", "CURVE" };
   return names[op];
 }
-
-static void
-assert_right_angle (const graphene_point_t *a,
-                    const graphene_point_t *b,
-                    const graphene_point_t *c)
-{
-  graphene_vec2_t u, v;
-
-  graphene_vec2_init (&u, a->x - b->x, a->y - b->y);
-  graphene_vec2_init (&v, a->x - c->x, a->y - c->y);
-
-  g_assert_cmpfloat_with_epsilon (graphene_vec2_dot (&u, &v), 0, 0.002);
-}
-
-static void
-assert_same_distance (const graphene_point_t *a,
-                      const graphene_point_t *b,
-                      const graphene_point_t *c)
-{
-  g_assert_cmpfloat_with_epsilon (graphene_point_distance (a, b, NULL, NULL),
-                                  graphene_point_distance (b, c, NULL, NULL),
-                                  0.001);
-}
 #endif
 
 static void
@@ -656,13 +633,6 @@ compute_offsets (PathOpData *op,
   op->re[1] = op->r[op->n_pts - 1];
   op->le[1] = op->l[op->n_pts - 1];
   op->angle[0] = op->angle[1] = 180.f;
-
-#if 0
-  assert_right_angle (&op->pts[0], &op->pts[1], &op->r[0]);
-  assert_right_angle (&op->pts[0], &op->pts[1], &op->l[0]);
-  assert_right_angle (&op->pts[op->n_pts - 1], &op->pts[op->n_pts - 2], &op->r[op->n_pts - 1]);
-  assert_right_angle (&op->pts[op->n_pts - 1], &op->pts[op->n_pts - 2], &op->l[op->n_pts - 1]);
-#endif
 }
 
 static int
@@ -847,13 +817,6 @@ compute_intersections (PathOpData *op1,
 
   op2->re[0] = op1->re[1];
   op2->le[0] = op1->le[1];
-
-#if 0
-  g_assert_true (graphene_point_near (&op1->re[1], &op2->re[0], 0.001));
-  g_assert_true (graphene_point_near (&op1->le[1], &op2->le[0], 0.001));
-  assert_same_distance (&op1->r[op1->n_pts - 1], &op1->re[1], &op2->r[0]);
-  assert_same_distance (&op1->l[op1->n_pts - 1], &op1->le[1], &op2->l[0]);
-#endif
 }
 
 static PathOpData *
@@ -1159,38 +1122,6 @@ gsk_contour_to_stroke (const GskContour *contour,
         }
     }
 
-#if 0
-  /* Subdivide */
-  sops = NULL;
-  for (l = ops; l; l = l->next)
-    {
-      op = l->data;
-
-      switch (op->op)
-        {
-        case GSK_PATH_MOVE:
-          g_assert_not_reached ();
-          break;
-
-        case GSK_PATH_LINE:
-        case GSK_PATH_CLOSE:
-          sops = g_list_prepend (sops, op);
-          break;
-
-        case GSK_PATH_CURVE:
-          subdivide_and_add (op, &sops);
-          g_free (op);
-          break;
-
-        default:
-          g_assert_not_reached ();
-        }
-    }
-
-  g_list_free (ops);
-  ops = g_list_reverse (sops);
-#endif
-
   for (l = ops; l; l = l->next)
     {
       int i;


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