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
..
broadway gdk: Pass the opaque rect to begin_frame() actually 2024-08-10 01:40:46 +02:00
gl gl: Handle GDK_MEMORY_NONE depth 2024-09-02 00:22:37 +02:00
gpu memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gen-gsk-gresources-xml.py
gsk.h gsk: Include GL renderer in gsk.h 2024-01-07 14:47:22 +01:00
gskboundingboxprivate.h
gskcairoblur.c gsk: Port the cairo blur to GdkColor 2024-08-08 15:43:49 -04:00
gskcairoblurprivate.h gsk: Port the cairo blur to GdkColor 2024-08-08 15:43:49 -04:00
gskcairorenderer.c gdk: Pass the opaque rect to begin_frame() actually 2024-08-10 01:40:46 +02:00
gskcairorenderer.h
gskcontour.c gskpathop: Introduce a type to represent an aligned graphene_point_t 2024-07-28 17:31:41 +01:00
gskcontourprivate.h gskpathop: Introduce a type to represent an aligned graphene_point_t 2024-07-28 17:31:41 +01:00
gskcurve-ct-values.c
gskcurve.c gskpathop: Introduce a type to represent an aligned graphene_point_t 2024-07-28 17:31:41 +01:00
gskcurveprivate.h gskpathop: Introduce a type to represent an aligned graphene_point_t 2024-07-28 17:31:41 +01:00
gskdebug.c gdk: Beef up gdk_parse_debug_var 2024-08-19 20:40:32 -04:00
gskdebugprivate.h Change the offload-disable flag 2024-08-19 20:40:32 -04:00
gskdiff.c
gskdiffprivate.h
gskenums.h
gskenumtypes.c.template
gskenumtypes.h.template
gskglshader.c gskglshader: Fix typo in deprecation docs 2024-07-08 09:21:43 +03:00
gskglshader.h gsk: Deprecate GskGLShader and the rendernode 2024-07-04 21:28:06 +02:00
gskglshaderprivate.h gsk: Deprecate GskGLShader and the rendernode 2024-07-04 21:28:06 +02:00
gskoffload.c offload: Use gsk_color_node_get_color2 2024-08-05 11:11:15 -04:00
gskoffloadprivate.h gdk: Rename GdkTextureTransform to GdkDihedral 2024-07-10 12:36:07 +02:00
gskpath.c gskpathop: Introduce a type to represent an aligned graphene_point_t 2024-07-28 17:31:41 +01:00
gskpath.h
gskpathbuilder.c gskpathop: Introduce a type to represent an aligned graphene_point_t 2024-07-28 17:31:41 +01:00
gskpathbuilder.h
gskpathmeasure.c
gskpathmeasure.h
gskpathopprivate.h gskpathop: Introduce a type to represent an aligned graphene_point_t 2024-07-28 17:31:41 +01:00
gskpathparser.c
gskpathpoint.c gskpathpoint: Document copy and free 2024-05-31 11:47:29 +02:00
gskpathpoint.h
gskpathpointprivate.h
gskpathprivate.h path: document enum 2024-04-28 08:33:03 +02:00
gskprivate.c Bump the pango dep 2024-04-04 00:56:24 +02:00
gskprivate.h Drop unused private API 2024-04-03 10:53:55 +02:00
gskprofiler.c
gskprofilerprivate.h
gskrectprivate.h gsk: Use gsk_rect_init_offset() everywhere 2024-09-02 00:22:37 +02:00
gskrenderer.c Change the offload-disable flag 2024-08-19 20:40:32 -04:00
gskrenderer.h API: Add gsk_renderer_realize_for_display() 2024-01-07 14:47:22 +01:00
gskrendererprivate.h renderer: Pass the display as part of the vfunc 2024-01-07 14:47:22 +01:00
gskrendernode.c docs: Add a missing bit 2024-08-11 14:47:59 -04:00
gskrendernode.h gsk: Warn about unused result in gsk_render_node_get_opaque_rect() 2024-08-10 01:40:45 +02:00
gskrendernodeimpl.c rendernode: Colors should not influence depth decisions 2024-09-02 00:22:37 +02:00
gskrendernodeparser.c node parser: Move parse_color even earlier 2024-08-17 16:24:20 -04:00
gskrendernodeparserprivate.h gsk: Allow custom fonts in node files 2024-01-15 18:58:17 -05:00
gskrendernodeprivate.h gsk: Add private text node api 2024-08-10 07:37:01 -04:00
gskroundedrect.c gsk: Use gsk_rect_init_offset() everywhere 2024-09-02 00:22:37 +02:00
gskroundedrect.h
gskroundedrectprivate.h gpu: Implement transform support for dihedral transforms 2024-07-10 21:34:12 +02:00
gskstroke.c gskstroke: Add missing return annotations 2024-06-01 10:01:19 +02:00
gskstroke.h gsk: Add autoptr cleanup function for GskStroke 2024-09-03 16:50:10 +01:00
gskstrokeprivate.h
gsktransform.c transform: Implement transform_point() for dihedrals 2024-07-10 21:34:12 +02:00
gsktransform.h
gsktransformprivate.h transform: Add gsk_transform_to_dihedral() 2024-07-10 14:38:48 +02:00
gsktypes.h
meson.build gsk: Add a cicp convert shader 2024-07-24 08:16:08 -06:00