diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-20 16:39:37 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-21 08:22:44 +0100 |
commit | b259cbffcfb41a20c8b0cf1c32f6ff3e9872a472 (patch) | |
tree | 48b15e06ec2f49b2d2974dbc18a99f2cd84feb5c | |
parent | 935ec0abcb3b92b1aad00885be59644bf775f5dd (diff) |
sna: Avoid copying from tiled source for an overwritten fill
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_tiling.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sna/sna_tiling.c b/src/sna/sna_tiling.c index 2d11443f..5fc7b404 100644 --- a/src/sna/sna_tiling.c +++ b/src/sna/sna_tiling.c @@ -655,22 +655,22 @@ sna_tiling_fill_boxes(struct sna *sna, assert(kgem_bo_can_blt(&sna->kgem, bo)); - if (!sna->render.copy_boxes(sna, GXcopy, - dst, dst_bo, 0, 0, - &tmp, bo, -dx, -dy, - REGION_RECTS(&this), REGION_NUM_RECTS(&this), 0)) + if (op > PictOpSrc && + !sna->render.copy_boxes(sna, GXcopy, + dst, dst_bo, 0, 0, + &tmp, bo, -dx, -dy, + REGION_RECTS(&this), REGION_NUM_RECTS(&this), 0)) goto err; RegionTranslate(&this, -dx, -dy); - if (!sna->render.fill_boxes(sna, op, format, color, - &tmp, bo, - REGION_RECTS(&this), REGION_NUM_RECTS(&this))) + if (!sna->render.fill_boxes(sna, op, format, color, &tmp, bo, + REGION_RECTS(&this), REGION_NUM_RECTS(&this))) goto err; if (!sna->render.copy_boxes(sna, GXcopy, - &tmp, bo, 0, 0, - dst, dst_bo, dx, dy, - REGION_RECTS(&this), REGION_NUM_RECTS(&this), 0)) + &tmp, bo, 0, 0, + dst, dst_bo, dx, dy, + REGION_RECTS(&this), REGION_NUM_RECTS(&this), 0)) goto err; kgem_bo_destroy(&sna->kgem, bo); |