From 7ed66ca0fd1160ede890c216c35d4ac42a98ab57 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 12 Sep 2014 21:17:04 +0100 Subject: 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 --- src/sna/gen4_vertex.c | 8 ---- src/sna/sna_trapezoids_precise.c | 81 ---------------------------------------- 2 files changed, 89 deletions(-) diff --git a/src/sna/gen4_vertex.c b/src/sna/gen4_vertex.c index 31044d69..7d757298 100644 --- a/src/sna/gen4_vertex.c +++ b/src/sna/gen4_vertex.c @@ -3089,14 +3089,6 @@ emit_span_boxes_linear__avx2(const struct sna_composite_spans_op *op, } #endif -inline static uint32_t -gen4_choose_spans_vertex_buffer(const struct sna_composite_op *op) -{ - int id = op->src.is_solid ? 1 : 2 + !op->src.is_affine; - DBG(("%s: id=%x (%d, 1)\n", __FUNCTION__, 1 << 2 | id, id)); - return 1 << 2 | id; -} - unsigned gen4_choose_spans_emitter(struct sna *sna, struct sna_composite_spans_op *tmp) { 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) { -- cgit v1.2.3