summaryrefslogtreecommitdiff
path: root/src/sna/gen5_render.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/gen5_render.c')
-rw-r--r--src/sna/gen5_render.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 23b0c147..3396acd0 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -1571,6 +1571,7 @@ gen5_composite_set_target(struct sna *sna,
bool partial)
{
BoxRec box;
+ unsigned hint;
op->dst.pixmap = get_drawable_pixmap(dst->pDrawable);
op->dst.width = op->dst.pixmap->drawable.width;
@@ -1584,9 +1585,14 @@ gen5_composite_set_target(struct sna *sna,
} else
sna_render_picture_extents(dst, &box);
- op->dst.bo = sna_drawable_use_bo (dst->pDrawable,
- PREFER_GPU | FORCE_GPU | RENDER_GPU,
- &box, &op->damage);
+ hint = PREFER_GPU | FORCE_GPU | RENDER_GPU;
+ if (!partial) {
+ hint |= IGNORE_CPU;
+ if (w == op->dst.width && h == op->dst.height)
+ hint |= REPLACES;
+ }
+
+ op->dst.bo = sna_drawable_use_bo(dst->pDrawable, hint, &box, &op->damage);
if (op->dst.bo == NULL)
return false;
@@ -1863,7 +1869,7 @@ gen5_render_composite(struct sna *sna,
if (!gen5_composite_set_target(sna, tmp, dst,
dst_x, dst_y, width, height,
- op > PictOpSrc || dst->pCompositeClip->data)) {
+ flags & COMPOSITE_PARTIAL || op > PictOpSrc || dst->pCompositeClip->data)) {
DBG(("%s: failed to set composite target\n", __FUNCTION__));
goto fallback;
}