summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-04 19:34:41 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-04 19:42:58 +0000
commit71b0924b586d9a60397e92e941e3d0cfa636ee61 (patch)
tree559cb75e96a0ac43768db3037e45968deec998ff
parentfc14e63256a9b756c7c77ffe73f2f13784396c5a (diff)
sna: Mark tiny CPU pixmaps as completely dirty
Avoid the overhead of tracking damage on small pixmaps when using CPU rasterisation; the extra cost of sending the whole pixmap compared to the damage is negligble should it ever be required on the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index da13efa8..68c10a5f 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -897,6 +897,9 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
return true;
}
+ if (priv->stride == 0 && priv->gpu_bo == NULL && flags & MOVE_WRITE)
+ return _sna_pixmap_move_to_cpu(pixmap, flags);
+
get_drawable_deltas(drawable, pixmap, &dx, &dy);
DBG(("%s: delta=(%d, %d)\n", __FUNCTION__, dx, dy));
if (dx | dy)