diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-07-12 23:57:42 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-07-13 00:01:08 +0100 |
commit | 0230ef72cbb2d3bcf7157548ddd52a71c0c771c5 (patch) | |
tree | faddb5936e645583f1efd88c2c1f99e9a8e7a494 /src/sna/gen2_render.c | |
parent | 2b16eaefb38b4a6efe50a397e68793ab9a1cb2ef (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/gen2_render.c')
-rw-r--r-- | src/sna/gen2_render.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c index ba57643b..385a5fd4 100644 --- a/src/sna/gen2_render.c +++ b/src/sna/gen2_render.c @@ -1889,7 +1889,8 @@ gen2_render_composite(struct sna *sna, if (too_large(tmp->dst.width, tmp->dst.height) || tmp->dst.bo->pitch > MAX_3D_PITCH) { if (!sna_render_composite_redirect(sna, tmp, - dst_x, dst_y, width, height)) + dst_x, dst_y, width, height, + op > PictOpSrc || dst->pCompositeClip->data != NULL)) return false; } @@ -2551,7 +2552,8 @@ gen2_render_composite_spans(struct sna *sna, if (too_large(tmp->base.dst.width, tmp->base.dst.height) || tmp->base.dst.bo->pitch > MAX_3D_PITCH) { if (!sna_render_composite_redirect(sna, &tmp->base, - dst_x, dst_y, width, height)) + dst_x, dst_y, width, height, + true)) return false; } @@ -3256,7 +3258,8 @@ fallback: extents.x1 + dst_dx, extents.y1 + dst_dy, extents.x2 - extents.x1, - extents.y2 - extents.y1)) + extents.y2 - extents.y1, + alu != GXcopy || n > 1)) goto fallback_tiled; } |