diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-06-19 12:05:11 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-06-19 12:25:38 -0400 |
commit | 6bd44c4fcd45aa64a757f8797db78252d2fee3b4 (patch) | |
tree | 2b7f4c3e51f00e3234e73435b02ba51b24be884d /render/pixman | |
parent | 64c0272f818523537fe8e133d97539e50fdfec64 (diff) |
renderer: Introduce wlr_scale_filter_mode
Diffstat (limited to 'render/pixman')
-rw-r--r-- | render/pixman/pass.c | 9 |
1 files changed, 9 insertions, 0 deletions
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, |