aboutsummaryrefslogtreecommitdiff
path: root/render/pixman
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-19 12:05:11 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-06-19 12:25:38 -0400
commit6bd44c4fcd45aa64a757f8797db78252d2fee3b4 (patch)
tree2b7f4c3e51f00e3234e73435b02ba51b24be884d /render/pixman
parent64c0272f818523537fe8e133d97539e50fdfec64 (diff)
renderer: Introduce wlr_scale_filter_mode
Diffstat (limited to 'render/pixman')
-rw-r--r--render/pixman/pass.c9
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,