diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-11 13:28:45 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-11 13:29:28 +0100 |
commit | 721cf30e9eeb0102c77f337332ad8259463b7fef (patch) | |
tree | dd3907af92fbfc1fc4d183fd765f8a409bcbe97a | |
parent | 15a4410cec111c3b3bd15ec33f29bc1f4cb709c1 (diff) |
sna/accel: If the data is already on the GPU, use it for the source
Fixes regression from 1ec6a0e2775 (sna: Move the source to the GPU
if it is reused).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 1edd3a3c..dab396e6 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1143,12 +1143,15 @@ sna_put_image(DrawablePtr drawable, GCPtr gc, int depth, RegionUninit(®ion); } -static Bool +static bool move_to_gpu(PixmapPtr pixmap, struct sna_pixmap *priv, const BoxRec *box) { int w = box->x2 - box->x1; int h = box->y2 - box->y1; + if (priv->gpu_bo) + return TRUE; + return ++priv->source_count * w*h >= 2 * pixmap->drawable.width * pixmap->drawable.height; } |