sna/accel: If the data is already on the GPU, use it for the source
Fixes regression from 1ec6a0e277 (sna: Move the source to the GPU
if it is reused).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
15a4410cec
commit
721cf30e9e
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue