gtk/gdk
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: Add missed compute_size and request_layout vfunc to GdkBroadwaySurface 2024-09-01 13:48:22 +00:00
deprecated gdk: Fix up introspection build 2023-05-21 09:46:49 -04:00
loaders Cosmetics 2024-07-28 11:33:39 -04:00
macos macos: Set transparent background for toplevel window 2024-08-30 12:06:18 +02:00
version Use #pragma once 2023-05-09 16:43:35 +01:00
wayland vulkan: Use wl_surface_offset 2024-08-31 07:15:08 -04:00
win32 WGL: Detect MESA D3D12 driver and request GDI compatibility 2024-09-04 20:02:44 +02:00
x11 x11: Fix initialization mess 2024-08-31 11:28:52 -04:00
COPYING Change FSF Address 2012-02-27 17:06:11 +00:00
default_cursor.png docs: Update cursor images 2023-09-21 19:51:11 +02:00
filetransferportal.c Remove G_ENABLE_DEBUG around debug checks 2023-11-05 11:16:23 +01:00
filetransferportalprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdk.c gdk: Beef up gdk_parse_debug_var 2024-08-19 20:40:32 -04:00
gdk.h gdk: Add public api for cicp 2024-07-24 16:45:21 -06:00
gdkapplaunchcontext.c Drop gdkintl.h 2022-09-23 23:33:42 -04:00
gdkapplaunchcontext.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkapplaunchcontextprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkarrayimpl.c array: Don't overflow array size 2024-05-10 21:22:03 -04:00
gdkcairo.c gdk: Drop some unused private api 2023-05-15 20:30:38 -04:00
gdkcairo.h gdk: Deprecated some pixbuf apis 2023-05-15 18:22:37 -04:00
gdkcairocontext.c gdk: Deprecate public begin/end_frame() APIs 2024-08-10 01:40:45 +02:00
gdkcairocontext.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkcairocontextprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkcairoprivate.h cairo: Add gdk_cairo_set_source_color 2024-08-05 11:11:14 -04:00
gdkcicpparams.c colorstate: Drop xyz for now 2024-08-06 15:38:31 -04:00
gdkcicpparams.h docs: Fix a typo 2024-08-11 14:47:48 -04:00
gdkcicpparamsprivate.h gdk: Add public api for cicp 2024-07-24 16:45:21 -06:00
gdkclipboard.c Use the appropriate annotations for callback closures 2024-07-03 16:57:47 +01:00
gdkclipboard.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkclipboardprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkcolor.c rendernode: Colors should not influence depth decisions 2024-09-02 00:22:37 +02:00
gdkcolordefs.h Fix up transfer function symmetry 2024-08-14 11:45:25 -04:00
gdkcolorimpl.h rendernode: Colors should not influence depth decisions 2024-09-02 00:22:37 +02:00
gdkcolorprivate.h rendernode: Colors should not influence depth decisions 2024-09-02 00:22:37 +02:00
gdkcolorstate.c gdk: Add gdk_color_state_clamp() 2024-08-17 18:12:23 +02:00
gdkcolorstate.h gdk: Add public api for cicp 2024-07-24 16:45:21 -06:00
gdkcolorstateprivate.h gdk: Add gdk_color_state_clamp() 2024-08-17 18:12:23 +02:00
gdkconfig.h.meson gdk: Cosmetics 2022-10-05 23:01:28 -04:00
gdkconfig.h.win32 Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkconfig.h.win32_vulkan Use a single compilation symbol 2019-11-27 13:33:43 +00:00
gdkconstructorprivate.h Rename gdkconstructor.h to gdkconstructorprivate.h 2022-09-23 23:14:08 -04:00
gdkcontentdeserializer.c Use the appropriate annotations for callback closures 2024-07-03 16:57:47 +01:00
gdkcontentdeserializer.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkcontentformats.c gdk: Fix an oversight in GdkContentFormats 2023-06-09 08:17:34 -04:00
gdkcontentformats.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkcontentformatsprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkcontentprovider.c Use the appropriate annotations for callback closures 2024-07-03 16:57:47 +01:00
gdkcontentprovider.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkcontentproviderimpl.c Drop gdkintl.h 2022-09-23 23:33:42 -04:00
gdkcontentproviderimpl.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkcontentproviderprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkcontentserializer.c Use the appropriate annotations for callback closures 2024-07-03 16:57:47 +01:00
gdkcontentserializer.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkcursor.c gdk: Add callback cursors 2024-04-04 01:07:28 +02:00
gdkcursor.h gdkcursor: Fix typo in GdkCursorGetTestureCallback 2024-06-01 09:04:00 +02:00
gdkcursorprivate.h gdk: Add callback cursors 2024-04-04 01:07:28 +02:00
gdkdebugprivate.h gdk: Beef up gdk_parse_debug_var 2024-08-19 20:40:32 -04:00
gdkdevice.c Use GDK_NO_MODIFIER_MASK in default prop values 2024-01-13 01:30:02 +01:00
gdkdevice.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkdevicepad.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkdevicepad.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkdevicepadprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdeviceprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdevicetool.c Various spelling mistakes across a few domains that show up in documentation. 2022-12-08 12:16:22 +00:00
gdkdevicetool.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkdevicetoolprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdihedral.c Add gdk_dihedral_get_name 2024-07-10 22:11:13 +02:00
gdkdihedralprivate.h Add gdk_dihedral_get_name 2024-07-10 22:11:13 +02:00
gdkdisplay.c Add a GDK_DISABLE env var 2024-08-19 20:40:32 -04:00
gdkdisplay.h Let GdkDisplay decide if shadows should be drawn 2024-01-25 12:09:10 +01:00
gdkdisplaymanager.c Avoid a bad warning 2023-05-01 10:40:26 -04:00
gdkdisplaymanager.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdisplaymanagerprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdisplayprivate.h vulkan: Remove unused features 2024-07-22 19:40:24 +02:00
gdkdmabuf.c dmabuf: Fix a check 2024-08-07 19:06:02 +02:00
gdkdmabufdownloader.c texturedownloader: Add color state 2024-07-16 21:23:44 +02:00
gdkdmabufdownloaderprivate.h texturedownloader: Add color state 2024-07-16 21:23:44 +02:00
gdkdmabufegl.c dmabuf: Ref previous context 2024-05-07 00:34:47 +02:00
gdkdmabufeglprivate.h egl: Split out a function 2023-12-20 01:51:46 +01:00
gdkdmabufformats.c Avoid calling memcpy with n == 0 2024-07-27 20:16:21 +01:00
gdkdmabufformats.h gdkdmabufformats: Add autoptr definition 2024-07-23 19:55:47 +02:00
gdkdmabufformatsbuilder.c dmabuf: Allow implicit modifiers 2023-10-24 22:33:45 -04:00
gdkdmabufformatsbuilderprivate.h dmabufformats: Add GdkDmabufFormatsBuilder 2023-10-14 22:29:10 +02:00
gdkdmabufformatsprivate.h dmabufformats: Add GdkDmabufFormatsBuilder 2023-10-14 22:29:10 +02:00
gdkdmabuffourccprivate.h dmabuf: Add DRM_FORMAT_MOD_INVALID to our formats 2024-08-08 19:03:31 +00:00
gdkdmabufprivate.h texturedownloader: Add color state 2024-07-16 21:23:44 +02:00
gdkdmabuftexture.c dmabuf: Make NULL the default colorstate in the builder 2024-07-22 14:54:05 +02:00
gdkdmabuftexture.h dmabuf: move DmabufTexture typedef 2023-12-20 01:51:46 +01:00
gdkdmabuftexturebuilder.c Add a GDK_DISABLE env var 2024-08-19 20:40:32 -04:00
gdkdmabuftexturebuilder.h dmabuf texture: color state support 2024-07-16 21:23:44 +02:00
gdkdmabuftexturebuilderprivate.h Add gdk_dmabuf_texture_builder_set_dmabuf 2024-04-07 11:12:13 -04:00
gdkdmabuftextureprivate.h Add a private header 2024-04-07 11:12:13 -04:00
gdkdrag.c dnd: Go back to using dnd-move as move cursor 2024-03-21 21:36:38 -04:00
gdkdrag.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkdragprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdragsurface.c Remove wrong annotation from GdkDragSurface::compute-size 2023-03-26 15:50:22 +01:00
gdkdragsurface.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdragsurfaceprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkdragsurfacesize.c g-i: Add since annotation to GdkSurfaceSize 2023-03-20 08:14:25 +00:00
gdkdragsurfacesize.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkdragsurfacesizeprivate.h Add GdkDragSurfaceSize 2023-03-14 19:41:44 -07:00
gdkdrawcontext.c drawcontext: Fix up color state ownership 2024-08-13 13:23:20 -04:00
gdkdrawcontext.h gdk: Deprecate public begin/end_frame() APIs 2024-08-10 01:40:45 +02:00
gdkdrawcontextprivate.h gdk: Pass the opaque rect to begin_frame() actually 2024-08-10 01:40:46 +02:00
gdkdrop.c Use the appropriate annotations for callback closures 2024-07-03 16:57:47 +01:00
gdkdrop.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkdropprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkenums.h docs: Add a line on explicit use of modifiers on macOS 2024-06-28 10:29:58 +02:00
gdkevents.c docs: Update function docs for gdk_event_triggers_context_menu 2024-07-29 20:07:13 +02:00
gdkevents.h Add Since annotations to enums 2023-12-22 08:47:47 -05:00
gdkeventsprivate.h main: Propagate event handled state up backend 2024-02-07 16:36:26 +01:00
gdkframeclock.c frameclock: Make timings history dynamic 2024-03-10 10:27:36 +01:00
gdkframeclock.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkframeclockidle.c Revert "gdk/frameclock: add mark when we discover frames may drop" 2024-05-01 08:03:16 -04:00
gdkframeclockidleprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkframeclockprivate.h frameclock: Make timings history dynamic 2024-03-10 10:27:36 +01:00
gdkframetimings.c gdk: Stop using g_slice 2023-03-14 14:56:42 -04:00
gdkframetimings.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkgl.c gl: Turn has_foo flags into GdkGLFeatures 2024-03-16 13:44:02 +01:00
gdkglcontext.c gl: Fix initial EGL context creation on X11 2024-08-29 01:31:47 +02:00
gdkglcontext.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkglcontextprivate.h gl: Fix initial EGL context creation on X11 2024-08-29 01:31:47 +02:00
gdkglobals.c gdk: Remove gdkinternals.h 2021-09-24 22:50:29 +02:00
gdkgltexture.c gl texture: color state support 2024-07-16 21:23:44 +02:00
gdkgltexture.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkgltexturebuilder.c gl texture: color state support 2024-07-16 21:23:44 +02:00
gdkgltexturebuilder.h gl texture: color state support 2024-07-16 21:23:44 +02:00
gdkgltextureprivate.h gltexture: Optionally take a sync object 2023-04-27 06:55:37 +02:00
gdkglversionprivate.h gdk: Add workaround for Visual Studio 2023-04-27 02:13:33 +02:00
gdkhsla.c gdk_rgba_parse: Support HSL colors 2021-09-10 16:56:42 -05:00
gdkhslaprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkkeys.c gdk: Tweaks to keyname handling 2022-09-24 10:03:37 -04:00
gdkkeys.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkkeysprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkkeysyms-update.pl Update a script slightly 2024-08-30 15:52:14 -04:00
gdkkeysyms.h gdkkeysyms.h: Regenerate for libX11 1.8.10 2024-08-30 15:52:58 -04:00
gdkkeyuni.c gdk: Update keyboard symbols from libxkbcommon 2022-01-29 14:31:09 +02:00
gdkmarshalers.list surface: add missing va_marshaller for layout signal 2021-12-07 22:21:19 -08:00
gdkmemoryformat.c memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gdkmemoryformatprivate.h memoryformat: Add linear/nearest choice for mipmaping 2024-09-06 15:47:35 -04:00
gdkmemorytexture.c memory texture: Fix a memory leak 2024-08-10 22:24:29 -04:00
gdkmemorytexture.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkmemorytexturebuilder.c gdk: Add GdkMemoryTexture::color-state 2024-07-16 21:23:44 +02:00
gdkmemorytexturebuilder.h gdk: Add GdkMemoryTexture::color-state 2024-07-16 21:23:44 +02:00
gdkmemorytextureprivate.h gdk: Add GdkMemoryTextureBuilder 2024-07-16 21:23:44 +02:00
gdkmonitor.c monitor: Don't forbid scales < 1 2024-08-17 08:26:55 -04:00
gdkmonitor.h monitor: Add gdk_monitor_get_scale 2024-01-30 20:56:08 -05:00
gdkmonitorprivate.h gdk: Add private convenience api 2024-04-09 19:13:34 -04:00
gdkpaintable.c docs: Fix: gdk->gtk and gdk->gsk links 2024-01-05 14:57:07 -05:00
gdkpaintable.h docs: Fix the reference link 2024-03-29 13:31:36 +00:00
gdkpango.c Drop gdkintl.h 2022-09-23 23:33:42 -04:00
gdkpango.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkparalleltask.c gdk: Add gdk_parallel_task_run() 2024-09-06 15:47:34 -04:00
gdkparalleltaskprivate.h gdk: Add gdk_parallel_task_run() 2024-09-06 15:47:34 -04:00
gdkpipeiostream.c Stop using enums in bitfields 2023-10-10 11:23:08 +03:00
gdkpipeiostreamprivate.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkpopup.c Cosmetics 2024-06-26 07:33:15 -04:00
gdkpopup.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkpopuplayout.c docs: Fix: gdk->gtk and gdk->gsk links 2024-01-05 14:57:07 -05:00
gdkpopuplayout.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdkpopupprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkprivate.h gdk: Drop unnecessary conditionals 2023-07-20 15:18:13 -04:00
gdkprofiler.c Tweak profiling strings 2024-01-21 14:02:08 -05:00
gdkprofilerprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkrectangle.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdkrectangle.h rect: Annotate some functions as pure 2024-01-06 17:18:18 -05:00
gdkrectangleprivate.h gdk: Introduce gdk_surface_is_opaque() 2024-08-10 01:40:46 +02:00
gdkrgba.c gdk: Add gdk_rgba_print 2024-05-31 21:29:49 -04:00
gdkrgba.h Revert "Merge branch 'rgba-new-from-string' into 'main'" 2023-12-02 10:55:35 +05:45
gdkrgbaprivate.h gdk: Add gdk_rgba_print 2024-05-31 21:29:49 -04:00
gdkseat.c Drop gdkintl.h 2022-09-23 23:33:42 -04:00
gdkseat.h gdk: Include pads in GDK_SEAT_CAPABILITY_ALL 2023-06-14 01:42:53 +02:00
gdkseatdefault.c gdk/x11: Implement XI2.4 touchpad gesture support 2021-09-27 23:19:33 +03:00
gdkseatdefaultprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdkseatprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdksnapshot.c docs: Fix: gdk->gtk and gdk->gsk links 2024-01-05 14:57:07 -05:00
gdksnapshot.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdksnapshotprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdksubsurface.c subsurface: Fully covered backgrounds don't need to be drawn 2024-08-14 08:30:55 +02:00
gdksubsurfaceprivate.h gdk: Rename GdkTextureTransform to GdkDihedral 2024-07-10 12:36:07 +02:00
gdksurface.c gl: Fix initial EGL context creation on X11 2024-08-29 01:31:47 +02:00
gdksurface.h gdk: Deprecate gdk_surface_set_opaque_region() 2024-08-10 01:40:46 +02:00
gdksurfaceprivate.h gdk: Introduce gdk_surface_is_opaque() 2024-08-10 01:40:46 +02:00
gdktexture.c texture: Don't mess up color states 2024-07-26 17:27:20 -04:00
gdktexture.h gdk: Give textures a color state 2024-07-11 14:57:19 +02:00
gdktexturedownloader.c downloader: Add some docs 2024-07-26 17:38:27 -04:00
gdktexturedownloader.h texturedownloader: Add color state 2024-07-16 21:23:44 +02:00
gdktexturedownloaderprivate.h texturedownloader: Add color state 2024-07-16 21:23:44 +02:00
gdktextureprivate.h texturedownloader: Add color state 2024-07-16 21:23:44 +02:00
gdktoplevel.c gdktoplevel: Document toplevel_titlebar_gesture 2024-06-29 15:14:33 +02:00
gdktoplevel.h Add a since tag to GDK_TOPLEVEL_STATE_SUSPENDED 2024-08-24 08:38:19 -04:00
gdktoplevellayout.c gdk: Clean up docs syntax 2021-05-22 17:25:26 -04:00
gdktoplevellayout.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdktoplevelprivate.h gdk: Change the private export handle api 2023-05-14 23:49:44 -04:00
gdktoplevelsize.c Let GdkDisplay decide if shadows should be drawn 2024-01-25 12:09:10 +01:00
gdktoplevelsize.h Minimize the amount of inclusions in public headers 2023-05-09 17:36:59 +01:00
gdktoplevelsizeprivate.h Convert headers to #pragma once 2023-03-31 15:11:10 -04:00
gdktypes.h gdk: Add public api for cicp 2024-07-24 16:45:21 -06:00
gdkvulkancontext.c vulkan: Don't print errors on vkCreateInstance() failure 2024-08-23 20:04:46 +02:00
gdkvulkancontext.h gdk: Don't include vulkan.h in public API anymore 2024-01-07 14:47:22 +01:00
gdkvulkancontextprivate.h vulkan: Turn debug messages into warnings 2024-08-08 04:41:16 +02:00
gen-gdk-gresources-xml.py gdk: Remove unused gdk_gl_texture_quads() function 2021-10-06 03:44:36 +02:00
gen-keyname-table.pl gdk: Tweaks to keyname handling 2022-09-24 10:03:37 -04:00
keynames-translate.txt gdk: Translate some more key names 2017-10-09 20:33:14 +02:00
keynames.txt Update keyname tables 2024-08-30 16:03:40 -04:00
keynamesprivate.h Update keyname tables 2024-08-30 16:03:40 -04:00
meson.build gdk: Add gdk_parallel_task_run() 2024-09-06 15:47:34 -04:00