From 403a4dd353eef67decfba965e40623e8137e1944 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 11 Nov 2011 14:59:03 +0000 Subject: 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 --- src/sna/sna_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index b095cd2b..561747de 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -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 -- cgit v1.2.3