diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-29 13:30:14 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-29 13:56:34 +0100 |
commit | 41a573c15ca1a1e775a2060be117374a5bc6f9b9 (patch) | |
tree | d803c709d238b68d8e21119c6f742cbbfb75cf7c | |
parent | d75501572a4ea95fc126314718468345630723a1 (diff) |
sna: Discard TearFree damage on partial migration
If we are overwriting part of the framebuffer, we know we do not need to
read that portion back from the scanout.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index b64855cd..00db82fc 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2531,9 +2531,14 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, return _sna_pixmap_move_to_cpu(pixmap, flags | MOVE_READ); } - if (priv->move_to_gpu && !priv->move_to_gpu(sna, priv, MOVE_READ)) { - DBG(("%s: move-to-gpu override failed\n", __FUNCTION__)); - return false; + + if (priv->move_to_gpu) { + if ((flags & MOVE_READ) == 0) + sna_pixmap_discard_shadow_damage(priv, region); + if (!priv->move_to_gpu(sna, priv, MOVE_READ)) { + DBG(("%s: move-to-gpu override failed\n", __FUNCTION__)); + return NULL; + } } if (get_drawable_deltas(drawable, pixmap, &dx, &dy)) { |