summaryrefslogtreecommitdiff
path: root/src/sna/sna_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-07-12 23:57:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-07-13 00:01:08 +0100
commit0230ef72cbb2d3bcf7157548ddd52a71c0c771c5 (patch)
treefaddb5936e645583f1efd88c2c1f99e9a8e7a494 /src/sna/sna_render.c
parent2b16eaefb38b4a6efe50a397e68793ab9a1cb2ef (diff)
sna: Skip copying to the intermediate target if we will completely overwrite it
Occasionally when forced to use an intermediate destination surface, we know that we will completely overwrite the contents of the surface and so we can forgo the initial copy from the target. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.c')
-rw-r--r--src/sna/sna_render.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 032dba7d..139081db 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -1883,7 +1883,8 @@ sna_render_picture_convert(struct sna *sna,
bool
sna_render_composite_redirect(struct sna *sna,
struct sna_composite_op *op,
- int x, int y, int width, int height)
+ int x, int y, int width, int height,
+ bool partial)
{
struct sna_composite_redirect *t = &op->redirect;
int bpp = op->dst.pixmap->drawable.bitsPerPixel;
@@ -2026,7 +2027,8 @@ sna_render_composite_redirect(struct sna *sna,
DBG(("%s: original box (%d, %d), (%d, %d)\n",
__FUNCTION__, t->box.x1, t->box.y1, t->box.x2, t->box.y2));
- if (!sna_blt_copy_boxes(sna, GXcopy,
+ if (partial &&
+ !sna_blt_copy_boxes(sna, GXcopy,
op->dst.bo, 0, 0,
bo, -t->box.x1, -t->box.y1,
bpp, &t->box, 1)) {