summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-11 14:59:03 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-11 23:19:33 +0000
commit403a4dd353eef67decfba965e40623e8137e1944 (patch)
tree192741e4b30af3943cec553087972ce36e3093b0
parent11acfaa62362660ff303f3afe90d1afa36b9ce73 (diff)
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>
-rw-r--r--src/sna/sna_accel.c2
1 files changed, 1 insertions, 1 deletions
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