diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 17:51:35 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 18:54:07 +0000 |
commit | ff4b8a03a40f7eb1d71b96aebb5daa1d8df83d2a (patch) | |
tree | 0fce39a66b29442d8baab196a8e4889e99924b50 | |
parent | 09bddddaf94b848f417e1c9449cfe4b21d2554dd (diff) |
sna: Use RepeatPad to avoid sampling the border color when downsampling
References: https://bugs.freedesktop.org/show_bug.cgi?id=45086
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 1 | ||||
-rw-r--r-- | src/sna/sna_render.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index d8a30174..b979d3cb 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3278,6 +3278,7 @@ struct kgem_bo *kgem_upload_source_image_halved(struct kgem *kgem, t.matrix[2][2] = 1 << 16; pixman_image_set_transform(src_image, &t); pixman_image_set_filter(src_image, PIXMAN_FILTER_BILINEAR, NULL, 0); + pixman_image_set_repeat(src_image, PIXMAN_REPEAT_PAD); pixman_image_composite(PIXMAN_OP_SRC, src_image, NULL, dst_image, diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index 4f861379..56d0014d 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -737,6 +737,8 @@ static int sna_render_picture_downsample(struct sna *sna, tmp_src = CreatePicture(0, &pixmap->drawable, format, 0, NULL, serverClient, &error); + tmp_src->repeat = true; + tmp_src->repeatType = RepeatPad; tmp_src->filter = PictFilterBilinear; memset(&t, 0, sizeof(t)); t.matrix[0][0] = 2 << 16; |