diff options
Diffstat (limited to 'src/sna/gen8_render.c')
-rw-r--r-- | src/sna/gen8_render.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 13e1662c..fcc37abd 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -1859,6 +1859,7 @@ gen8_composite_set_target(struct sna *sna, bool partial) { BoxRec box; + unsigned int hint; op->dst.pixmap = get_drawable_pixmap(dst->pDrawable); op->dst.format = dst->format; @@ -1874,9 +1875,14 @@ gen8_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; @@ -2191,7 +2197,7 @@ gen8_render_composite(struct sna *sna, tmp->op = op; if (!gen8_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)) goto fallback; switch (gen8_composite_picture(sna, src, &tmp->src, |