diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-11 10:34:37 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-11 10:34:37 +0000 |
commit | a02bbd8700690c98c6cf3ae98dd7ee3da9887b0a (patch) | |
tree | 5ae770b70debb1e7f8318ab4d870f75cbc071b28 | |
parent | 43a99648635fa76e0d6d71acaeb6ba919d24eb26 (diff) |
sna: Only transfer the bo if the src/dst are of matching size
If the src replaces the dst, it could just be a much larger pixmap!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 0b726269..861cbe75 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2013,7 +2013,9 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc, replaces)); if (replaces) { - if (dst_priv && !dst_priv->pinned && + if (src_pixmap->drawable.width == dst_pixmap->drawable.width && + src_pixmap->drawable.height == dst_pixmap->drawable.height && + dst_priv && !dst_priv->pinned && 0 && src_priv && !src_priv->pinned && src_priv->gpu_damage == NULL) { if (sna_pixmap_move_to_gpu(src_pixmap)) { |