From 7b88f87945f23b3f80ae44b2aa19f00dff1904c8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 18 Dec 2011 00:44:00 +0000 Subject: [PATCH] sna: Upload images in place from CopyArea As for PutImage, if the damage will be immediately flushed out to the GPU bo, we may as well do the write directly to the GPU bo and not staged via the shadow. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 5b96e676..fdd3e905 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2219,6 +2219,9 @@ static bool copy_use_gpu_bo(struct sna *sna, struct sna_pixmap *priv, RegionPtr region) { + if (priv->flush) + return true; + if (region_inplace(sna, priv->pixmap, region, priv)) return true;