summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids_precise.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-12 21:17:04 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-12 21:17:04 +0100
commit7ed66ca0fd1160ede890c216c35d4ac42a98ab57 (patch)
tree5a1c0d8aa4f971d895233cfe011da572de2f5d5e /src/sna/sna_trapezoids_precise.c
parentf0d5dbe9bf0d507fd5b60bd7a90be09351f75249 (diff)
sna: Remvoe unused code
sna_trapezoids_precise.c:566:1: warning: unused function 'polygon_add_line' [-Wunused-function] gen4_vertex.c:3093:1: warning: unused function 'gen4_choose_spans_vertex_buffer' [-Wunused-function] Reported-by: Zdenek Kabelac <zkabelac@redhat.com Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids_precise.c')
-rw-r--r--src/sna/sna_trapezoids_precise.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/src/sna/sna_trapezoids_precise.c b/src/sna/sna_trapezoids_precise.c
index 6cde8249..99ed087e 100644
--- a/src/sna/sna_trapezoids_precise.c
+++ b/src/sna/sna_trapezoids_precise.c
@@ -562,87 +562,6 @@ polygon_add_edge(struct polygon *polygon,
polygon->num_edges++;
}
-inline static void
-polygon_add_line(struct polygon *polygon,
- const xPointFixed *p1,
- const xPointFixed *p2)
-{
- struct edge *e = &polygon->edges[polygon->num_edges];
- int dx = p2->x - p1->x;
- int dy = p2->y - p1->y;
- int top, bot;
-
- if (dy == 0)
- return;
-
- __DBG(("%s: line=(%d, %d), (%d, %d)\n",
- __FUNCTION__, (int)p1->x, (int)p1->y, (int)p2->x, (int)p2->y));
-
- e->dir = 1;
- if (dy < 0) {
- const xPointFixed *t;
-
- dx = -dx;
- dy = -dy;
-
- e->dir = -1;
-
- t = p1;
- p1 = p2;
- p2 = t;
- }
- assert (dy > 0);
- e->dy = dy;
-
- top = MAX(p1->y, polygon->ymin);
- bot = MIN(p2->y, polygon->ymax);
- if (bot <= top)
- return;
-
- e->ytop = top;
- e->height_left = bot - top;
- if (e->height_left <= 0)
- return;
-
- if (dx == 0) {
- e->x.quo = p1->x;
- e->x.rem = -dy;
- e->dxdy.quo = 0;
- e->dxdy.rem = 0;
- e->dy = 0;
- } else {
- e->dxdy = floored_divrem(dx, dy);
- if (top == p1->y) {
- e->x.quo = p1->x;
- e->x.rem = -dy;
- } else {
- e->x = floored_muldivrem(top - p1->y, dx, dy);
- e->x.quo += p1->x;
- e->x.rem -= dy;
- }
- }
-
- if (polygon->num_edges > 0) {
- struct edge *prev = &polygon->edges[polygon->num_edges-1];
- /* detect degenerate triangles inserted into tristrips */
- if (e->dir == -prev->dir &&
- e->ytop == prev->ytop &&
- e->height_left == prev->height_left &&
- e->x.quo == prev->x.quo &&
- e->x.rem == prev->x.rem &&
- e->dxdy.quo == prev->dxdy.quo &&
- e->dxdy.rem == prev->dxdy.rem) {
- unsigned ix = EDGE_Y_BUCKET_INDEX(e->ytop,
- polygon->ymin);
- polygon->y_buckets[ix] = prev->next;
- return;
- }
- }
-
- _polygon_insert_edge_into_its_y_bucket(polygon, e);
- polygon->num_edges++;
-}
-
static void
active_list_reset(struct active_list *active)
{