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>
This commit is contained in:
Chris Wilson 2011-12-11 10:34:37 +00:00
parent 43a9964863
commit a02bbd8700
1 changed files with 3 additions and 1 deletions

View File

@ -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)) {