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>
This commit is contained in:
Chris Wilson 2012-01-24 17:51:35 +00:00
parent 09bddddaf9
commit ff4b8a03a4
2 changed files with 3 additions and 0 deletions

View File

@ -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,

View File

@ -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;