summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-04 22:23:39 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-05 21:53:08 +0000
commitf30b0beea4f5657a60eb5b286f41105298fa451a (patch)
tree1c91d1ca5df2adcfc9c780c2d3ee0189f2db64dc
parentb69c9dfae128ed69a397a066b8fbe62012742bf1 (diff)
sna/trapezoids: Ellide empty cells
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_trapezoids.c23
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;