Remove commented-out fbAddTriangles
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Thu, 4 Jun 2009 11:17:36 +0000 (07:17 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Fri, 19 Jun 2009 17:07:35 +0000 (13:07 -0400)
pixman/pixman-trap.c

index 7c0e96e..7e44e4f 100644 (file)
@@ -186,97 +186,3 @@ pixman_rasterize_trapezoid (pixman_image_t *    image,
        pixman_rasterize_edges (image, &l, &r, t, b);
     }
 }
-
-#if 0
-static int
-_GreaterY (pixman_point_fixed_t *a, pixman_point_fixed_t *b)
-{
-    if (a->y == b->y)
-       return a->x > b->x;
-    return a->y > b->y;
-}
-
-/*
- * Note that the definition of this function is a bit odd because
- * of the X coordinate space (y increasing downwards).
- */
-static int
-_Clockwise (pixman_point_fixed_t *ref, pixman_point_fixed_t *a, pixman_point_fixed_t *b)
-{
-    pixman_point_fixed_t       ad, bd;
-
-    ad.x = a->x - ref->x;
-    ad.y = a->y - ref->y;
-    bd.x = b->x - ref->x;
-    bd.y = b->y - ref->y;
-
-    return ((pixman_fixed_32_32_t) bd.y * ad.x - (pixman_fixed_32_32_t) ad.y * bd.x) < 0;
-}
-
-/* FIXME -- this could be made more efficient */
-void
-fbAddTriangles (pixman_image_t *  pPicture,
-               int16_t     x_off,
-               int16_t     y_off,
-               int         ntri,
-               xTriangle *tris)
-{
-    pixman_point_fixed_t         *top, *left, *right, *tmp;
-    xTrapezoid     trap;
-
-    for (; ntri; ntri--, tris++)
-    {
-       top = &tris->p1;
-       left = &tris->p2;
-       right = &tris->p3;
-       if (_GreaterY (top, left)) {
-           tmp = left; left = top; top = tmp;
-       }
-       if (_GreaterY (top, right)) {
-           tmp = right; right = top; top = tmp;
-       }
-       if (_Clockwise (top, right, left)) {
-           tmp = right; right = left; left = tmp;
-       }
-       
-       /*
-        * Two cases:
-        *
-        *              +               +
-        *             / \             / \
-        *            /   \           /   \
-        *           /     +         +     \
-        *      /    --           --    \
-        *     /   --               --   \
-        *    / ---                   --- \
-        *       +--                         --+
-        */
-       
-       trap.top = top->y;
-       trap.left.p1 = *top;
-       trap.left.p2 = *left;
-       trap.right.p1 = *top;
-       trap.right.p2 = *right;
-       if (right->y < left->y)
-           trap.bottom = right->y;
-       else
-           trap.bottom = left->y;
-       fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off);
-       if (right->y < left->y)
-       {
-           trap.top = right->y;
-           trap.bottom = left->y;
-           trap.right.p1 = *right;
-           trap.right.p2 = *left;
-       }
-       else
-       {
-           trap.top = left->y;
-           trap.bottom = right->y;
-           trap.left.p1 = *left;
-           trap.left.p2 = *right;
-       }
-       fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off);
-    }
-}
-#endif