From c66a910753941c905299e62d9e31a4e90c0bbe98 Mon Sep 17 00:00:00 2001 From: Consolatis <40171-Consolatis@users.noreply.gitlab.freedesktop.org> Date: Thu, 2 Apr 2026 00:53:06 +0200 Subject: [PATCH] render/pixman: fix bilinear filtering to match gles2 renderer Before this patch the pixman renderer would use "constant padding" for bilinear scaling which meant that the edges would either be dark or turn transparent. The effect was most obvious when trying to scale a single row buffer to a height like 100. The center would have the desired color but the edges to both sides would fade into transparency. We now use PIXMAN_REPEAT_PAD which clamps out-of-bound pixels and seems to match the behavior of the gles2 renderer. --- render/pixman/pass.c | 1 + 1 file changed, 1 insertion(+) diff --git a/render/pixman/pass.c b/render/pixman/pass.c index d3ee17dca..af738bb42 100644 --- a/render/pixman/pass.c +++ b/render/pixman/pass.c @@ -159,6 +159,7 @@ static void render_pass_add_texture(struct wlr_render_pass *wlr_pass, switch (options->filter_mode) { case WLR_SCALE_FILTER_BILINEAR: + pixman_image_set_repeat(texture->image, PIXMAN_REPEAT_PAD); pixman_image_set_filter(texture->image, PIXMAN_FILTER_BILINEAR, NULL, 0); break; case WLR_SCALE_FILTER_NEAREST: