Skip to content

Commit fcf25f1

Browse files
committed
better filter selection
1 parent d21d01c commit fcf25f1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/tilecache.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,10 +975,9 @@ tilecache_snapshot(Tilecache *tilecache, GtkSnapshot *snapshot,
975975
/* If we are zooming in beyond 1:1, we want nearest so we don't
976976
* blur the image. For zooming out, we want trilinear to get
977977
* mipmaps and antialiasing.
978-
GskScalingFilter filter = scale > 1.0 ?
979-
GSK_SCALING_FILTER_NEAREST : GSK_SCALING_FILTER_TRILINEAR;
980978
*/
981-
GskScalingFilter filter = GSK_SCALING_FILTER_NEAREST;
979+
GskScalingFilter filter = scale > pixel_size ?
980+
GSK_SCALING_FILTER_NEAREST : GSK_SCALING_FILTER_TRILINEAR;
982981

983982
graphene_rect_t bounds;
984983
bounds.origin.x =

0 commit comments

Comments
 (0)