summaryrefslogtreecommitdiff
path: root/src/sna/gen8_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-23 09:07:13 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-23 09:07:13 +0100
commitfb51ec44f4b6069ab854233d5d0da34eb79f754c (patch)
treebf29b83766c36d3d2f07a3c5900f01df04d3a444 /src/sna/gen8_render.c
parent96d2749660e1738847222f2d9dbb7303b7deb5bf (diff)
sna: Rename IGNORE_CPU to IGNORE_DAMAGE to better reflect its purpose
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen8_render.c')
-rw-r--r--src/sna/gen8_render.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index e2a4bfc1..b66a7357 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -1956,7 +1956,7 @@ gen8_composite_set_target(struct sna *sna,
hint = PREFER_GPU | FORCE_GPU | RENDER_GPU;
if (!partial) {
- hint |= IGNORE_CPU;
+ hint |= IGNORE_DAMAGE;
if (w == op->dst.width && h == op->dst.height)
hint |= REPLACES;
}
@@ -1968,6 +1968,11 @@ gen8_composite_set_target(struct sna *sna,
if (unaligned(op->dst.bo, dst->pDrawable->bitsPerPixel))
return false;
+ if (hint & REPLACES) {
+ struct sna_pixmap *priv = sna_pixmap(op->dst.pixmap);
+ kgem_bo_pair_undo(&sna->kgem, priv->gpu_bo, priv->cpu_bo);
+ }
+
get_drawable_deltas(dst->pDrawable, op->dst.pixmap,
&op->dst.x, &op->dst.y);