mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-16 08:21:40 -04:00
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.
(cherry picked from commit c66a910753)
This commit is contained in:
parent
7310756297
commit
5d2172b7fa
1 changed files with 1 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue