diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-16 23:33:25 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-17 21:26:34 +0000 |
commit | 2ff0826f94ca16e95cd662385f7091be750dec30 (patch) | |
tree | 0169ae70036781c2f6fe5263b14f0b8d0d747731 | |
parent | 55520bab578865f878965aa362ec4933f4b26050 (diff) |
sna: Discard GPU damage first before choosing where to fill_boxes()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_composite.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c index 09d38276..b54bd33c 100644 --- a/src/sna/sna_composite.c +++ b/src/sna/sna_composite.c @@ -702,11 +702,6 @@ sna_composite_rectangles(CARD8 op, boxes = pixman_region_rectangles(®ion, &num_boxes); - if (too_small(dst->pDrawable)) { - DBG(("%s: fallback, dst is too small\n", __FUNCTION__)); - goto fallback; - } - /* If we going to be overwriting any CPU damage with a subsequent * operation, then we may as well delete it without moving it * first to the GPU. @@ -717,6 +712,11 @@ sna_composite_rectangles(CARD8 op, sna_damage_subtract(&priv->cpu_damage, ®ion); } + if (too_small(dst->pDrawable)) { + DBG(("%s: fallback, dst is too small\n", __FUNCTION__)); + goto fallback; + } + priv = sna_pixmap_move_to_gpu(pixmap); if (priv == NULL) { DBG(("%s: fallback due to no GPU bo\n", __FUNCTION__)); |