sna: Defer source migration for a solitary upload via CopyArea

Try to avoid allocating a GPU pixmap for PutImage followed by CopyArea.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-11 14:59:03 +00:00
parent 11acfaa623
commit 403a4dd353
1 changed files with 1 additions and 1 deletions

View File

@ -1778,7 +1778,7 @@ move_to_gpu(PixmapPtr pixmap, struct sna_pixmap *priv,
if (alu != GXcopy)
return TRUE;
return ++priv->source_count * w*h >= 2 * pixmap->drawable.width * pixmap->drawable.height;
return ++priv->source_count * w*h >= (SOURCE_BIAS+2) * (int)pixmap->drawable.width * pixmap->drawable.height;
}
static void