diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-05-20 11:08:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-05-21 09:31:55 +0100 |
commit | ef9dc6fae585d5616446eedc1e6e91173f4064c1 (patch) | |
tree | d581f39596ee855a7a41bc07278efb05257fb014 /src/sna/sna_composite.c | |
parent | d6c30d1d4df6bcdfa075bd29da7c8aabee20774c (diff) |
sna: Undo a few more overwritten operations upon a bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_composite.c')
-rw-r--r-- | src/sna/sna_composite.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c index ae63e683..17cc68c1 100644 --- a/src/sna/sna_composite.c +++ b/src/sna/sna_composite.c @@ -933,8 +933,9 @@ sna_composite_rectangles(CARD8 op, sna_damage_destroy(&priv->cpu_damage); list_del(&priv->flush_list); } - if (region_subsumes_drawable(®ion, &pixmap->drawable) || - box_inplace(pixmap, ®ion.extents)) { + if (region_subsumes_drawable(®ion, &pixmap->drawable)) + hint |= REPLACES; + if (hint & REPLACES || box_inplace(pixmap, ®ion.extents)) { DBG(("%s: promoting to full GPU\n", __FUNCTION__)); if (priv->gpu_bo && priv->cpu_damage == NULL) { assert(priv->gpu_bo->proxy == NULL); @@ -958,6 +959,8 @@ sna_composite_rectangles(CARD8 op, DBG(("%s: fallback due to no GPU bo\n", __FUNCTION__)); goto fallback; } + if (hint & REPLACES) + kgem_bo_undo(&sna->kgem, bo); if (!sna->render.fill_boxes(sna, op, dst->format, color, pixmap, bo, boxes, num_boxes)) { |