From 6bd44c4fcd45aa64a757f8797db78252d2fee3b4 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 19 Jun 2023 12:05:11 -0400 Subject: renderer: Introduce wlr_scale_filter_mode --- render/pixman/pass.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'render/pixman') diff --git a/render/pixman/pass.c b/render/pixman/pass.c index 3f0927ee..0528d540 100644 --- a/render/pixman/pass.c +++ b/render/pixman/pass.c @@ -120,6 +120,15 @@ static void render_pass_add_texture(struct wlr_render_pass *wlr_pass, height = src_box.height; } + switch (options->filter_mode) { + case WLR_SCALE_FILTER_BILINEAR: + pixman_image_set_filter(texture->image, PIXMAN_FILTER_BILINEAR, NULL, 0); + break; + case WLR_SCALE_FILTER_NEAREST: + pixman_image_set_filter(texture->image, PIXMAN_FILTER_NEAREST, NULL, 0); + break; + } + pixman_image_set_clip_region32(buffer->image, (pixman_region32_t *)options->clip); pixman_image_composite32(PIXMAN_OP_OVER, texture->image, mask, buffer->image, src_box.x, src_box.y, 0, 0, dest_x, dest_y, -- cgit v1.2.3