summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-05-07 21:19:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-05-07 21:53:46 +0100
commitefd9e9c3eeb83b9e5725fa642066925d608c059d (patch)
tree40d4c517a1e1952922d42686e4ed2ea5e1eaf1ba /src
parent1385ca9eeb26b0b82b623da619a65036830ccceb (diff)
sna/dri: Use move-area-to-gpu to handle clipped regions more efficiently
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_dri.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index f30770fb..9b882a7d 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -747,14 +747,10 @@ __sna_dri_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region,
unsigned int flags;
flags = MOVE_WRITE | __MOVE_FORCE;
- if (clip.data ||
- clip.extents.x1 > 0 ||
- clip.extents.x2 < pixmap->drawable.width ||
- clip.extents.y1 > 0 ||
- clip.extents.y2 < pixmap->drawable.height)
+ if (clip.data)
flags |= MOVE_READ;
- priv = sna_pixmap_move_to_gpu(pixmap, flags);
+ priv = sna_pixmap_move_area_to_gpu(pixmap, &clip.extents, flags);
if (priv) {
damage(pixmap, priv, region);
dst_bo = priv->gpu_bo;