diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-04 22:23:39 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-05 21:53:08 +0000 |
commit | f30b0beea4f5657a60eb5b286f41105298fa451a (patch) | |
tree | 1c91d1ca5df2adcfc9c780c2d3ee0189f2db64dc | |
parent | b69c9dfae128ed69a397a066b8fbe62012742bf1 (diff) |
sna/trapezoids: Ellide empty cells
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_trapezoids.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index 2d8b3b97..33ea3bbb 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -1249,18 +1249,19 @@ tor_blt(struct sna *sna, cell->x, cell->covered_height, cell->uncovered_area, cover, xmax)); - box.x2 = x; - if (box.x2 > box.x1 && (unbounded || cover)) { - __DBG(("%s: span (%d, %d)x(%d, %d) @ %d\n", __FUNCTION__, - box.x1, box.y1, - box.x2 - box.x1, - box.y2 - box.y1, - cover)); - span(sna, op, clip, &box, cover); + if (cell->covered_height || cell->uncovered_area) { + box.x2 = x; + if (box.x2 > box.x1 && (unbounded || cover)) { + __DBG(("%s: span (%d, %d)x(%d, %d) @ %d\n", __FUNCTION__, + box.x1, box.y1, + box.x2 - box.x1, + box.y2 - box.y1, + cover)); + span(sna, op, clip, &box, cover); + } + box.x1 = box.x2; + cover += cell->covered_height*FAST_SAMPLES_X*2; } - box.x1 = box.x2; - - cover += cell->covered_height*FAST_SAMPLES_X*2; if (cell->uncovered_area) { int area = cover - cell->uncovered_area; |