Files
gtk/gsk
Benjamin Otte 896ea5b753 memoryformat: Add linear/nearest choice for mipmaping
linear will average all the pixels for the lod, nearest will just pick
one (using the same method as OpenGL/Vulkan, picking bottom right
center).

This doesn't really make linear/nearest filtering work as it should
(because it's still a form of mipmaps), but it has 2 advantages:

1. it gets closer to the desired effect

2. it is a lot faster

Because only 1 pixel is chosen from the original image, instead of
averaging all pixels, a lot less memory needs to be accessed, and
because memory access is the bottleneck for large images, the speedup is
almost linear with the number of pixels not accessed.
And that means that even for lot level 3, aka 1/8th scale, only 1/64 of
the pixels need to be accessed, and everything is 50x faster.

Switching gtk4-demo --run=image_scaling to linear/nearest makes all the
lag go away for me, even with a 64k x 64k image.
2024-09-06 15:47:35 -04:00
..
2024-09-02 00:22:37 +02:00
2024-01-07 14:47:22 +01:00
2024-08-19 20:40:32 -04:00
2023-03-14 14:56:42 -04:00
2023-12-22 08:47:47 -05:00
2023-08-28 21:14:28 -04:00
2023-08-25 20:16:49 -04:00
2023-12-26 21:57:04 -05:00
2024-04-28 08:33:03 +02:00
2024-04-04 00:56:24 +02:00
2024-04-03 10:53:55 +02:00
2023-04-27 13:42:03 +02:00
2024-08-19 20:40:32 -04:00
2024-08-11 14:47:59 -04:00
2023-03-31 15:11:10 -04:00
2023-09-15 03:46:27 +02:00
2024-07-24 08:16:08 -06:00