From 1f74e9cf395e56d9a6cbad19a92271f995ca442b Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 26 Jul 2025 20:19:53 +0100 Subject: [PATCH 01/16] have a go at libraw --- build/libraw.mk | 24 ++++++++++++++++++++++++ build/vips-all.mk | 5 +++-- build/vipsdisp.mk | 4 ++-- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 build/libraw.mk diff --git a/build/libraw.mk b/build/libraw.mk new file mode 100644 index 00000000..deb47f6f --- /dev/null +++ b/build/libraw.mk @@ -0,0 +1,24 @@ +PKG := libraw +$(PKG)_WEBSITE := https://www.libraw.org +$(PKG)_DESCR := Load many camera RAW formats +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.21.4 +$(PKG)_CHECKSUM := 6be43f19397e43214ff56aab056bf3ff4925ca14012ce5a1538a172406a09e63 +$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) +$(PKG)_SUBDIR := LibRaw-$($(PKG)_VERSION) +$(PKG)_FILE := LibRaw-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://www.libraw.org/data/$($(PKG)_FILE) + +# we can't use --enable-openmp without pthreads support +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-examples \ + --enable-jpeg \ + --enable-jasper \ + --enable-zlib \ + --enable-lcms + + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_LIB) +endef diff --git a/build/vips-all.mk b/build/vips-all.mk index 95030e40..6182043b 100644 --- a/build/vips-all.mk +++ b/build/vips-all.mk @@ -2,7 +2,7 @@ PKG := vips-all $(PKG)_WEBSITE := https://libvips.github.io/libvips/ $(PKG)_DESCR := A fast image processing library with low memory needs. $(PKG)_IGNORE := -$(PKG)_VERSION := 8.17.1 +$(PKG)_VERSION := 8.18.0-test1 $(PKG)_CHECKSUM := 4d8c3325922c5300253d7594507a8f1d3caf8eed70dfb66cc7eb2cbed65bb5ca $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/vips-[0-9]*.patch))) $(PKG)_GH_CONF := libvips/libvips/releases,v,,,,.tar.xz @@ -11,7 +11,8 @@ $(PKG)_FILE := vips-$($(PKG)_VERSION).tar.xz $(PKG)_DEPS := cc meson-wrapper libwebp librsvg glib pango libarchive \ libjpeg-turbo tiff lcms libexif libheif libspng \ libimagequant highway imagemagick matio openexr \ - cfitsio nifticlib poppler fftw openslide libjxl cgif + cfitsio nifticlib poppler fftw openslide libjxl cgif \ + libraw define $(PKG)_PRE_CONFIGURE # Copy some files to the packaging directory diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index e6a64a22..a04e9337 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -2,8 +2,8 @@ PKG := vipsdisp $(PKG)_WEBSITE := https://github.com/jcupitt/vipsdisp $(PKG)_DESCR := Tiny libvips / gtk+4 image viewer $(PKG)_IGNORE := -$(PKG)_VERSION := 4.0.0 -$(PKG)_CHECKSUM := 7bbb6740b13d0b211af2efab83d3a0d6e4646b15f57a038ac44ad67f446c5b64 +$(PKG)_VERSION := 4.1.0-rc1 +$(PKG)_CHECKSUM := $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) $(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,.tar.xz $(PKG)_DEPS := cc meson-wrapper gtk4 vips-all From 5c37f793caa46f9ca84cc1bd2c25f621095de2ff Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 27 Jul 2025 11:19:16 +0100 Subject: [PATCH 02/16] us the upstream libraw.mk --- build/libraw.mk | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 build/libraw.mk diff --git a/build/libraw.mk b/build/libraw.mk deleted file mode 100644 index deb47f6f..00000000 --- a/build/libraw.mk +++ /dev/null @@ -1,24 +0,0 @@ -PKG := libraw -$(PKG)_WEBSITE := https://www.libraw.org -$(PKG)_DESCR := Load many camera RAW formats -$(PKG)_IGNORE := -$(PKG)_VERSION := 0.21.4 -$(PKG)_CHECKSUM := 6be43f19397e43214ff56aab056bf3ff4925ca14012ce5a1538a172406a09e63 -$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) -$(PKG)_SUBDIR := LibRaw-$($(PKG)_VERSION) -$(PKG)_FILE := LibRaw-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://www.libraw.org/data/$($(PKG)_FILE) - -# we can't use --enable-openmp without pthreads support -define $(PKG)_BUILD - cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ - $(MXE_CONFIGURE_OPTS) \ - --disable-examples \ - --enable-jpeg \ - --enable-jasper \ - --enable-zlib \ - --enable-lcms - - $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' - $(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_LIB) -endef From fbfe0f0698e88789996e924529aefa3332eff7de Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 27 Jul 2025 14:12:05 +0200 Subject: [PATCH 03/16] Fix libraw compilation --- README.md | 2 + build/overrides.mk | 42 ++++++++++++++++-- build/patches/libraw-0.21-fixes.patch | 34 +++++++++++++++ build/patches/libtool-2-fixes.patch | 63 +++++++++++++++++++++++++++ build/plugins/jpegli/overrides.mk | 1 + build/plugins/mozjpeg/overrides.mk | 1 + build/plugins/zlib-ng/overrides.mk | 1 + build/vips-all.mk | 3 +- container/Dockerfile | 3 ++ 9 files changed, 145 insertions(+), 5 deletions(-) create mode 100644 build/patches/libraw-0.21-fixes.patch create mode 100644 build/patches/libtool-2-fixes.patch diff --git a/README.md b/README.md index 24c32eb2..562668a7 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ Same as libvips-web + these extra dependencies: | [imath] | 3.1.9 | BSD 3-Clause | | [libdicom] | 1.2.0 | MIT Licence | | [libjxl] | 0.11.1 | BSD 3-Clause | +| [libraw] | 0.21.4 | LGPL-2.1-only | | [matio] | 1.5.28 | BSD 2-Clause | | [nifticlib] | 3.0.1 | Public domain | | [openexr] | 3.1.11 | BSD 3-Clause | @@ -115,6 +116,7 @@ Same as libvips-web + these extra dependencies: [imath]: https://github.com/AcademySoftwareFoundation/Imath [libdicom]: https://github.com/ImagingDataCommons/libdicom [libjxl]: https://github.com/libjxl/libjxl +[libraw]: https://github.com/LibRaw/LibRaw [matio]: https://github.com/tbeu/matio [nifticlib]: https://github.com/NIFTI-Imaging/nifti_clib [openexr]: https://github.com/AcademySoftwareFoundation/openexr diff --git a/build/overrides.mk b/build/overrides.mk index aa47a637..606c9a24 100644 --- a/build/overrides.mk +++ b/build/overrides.mk @@ -157,6 +157,14 @@ libjpeg-turbo_SUBDIR := libjpeg-turbo-$(libjpeg-turbo_VERSION) libjpeg-turbo_FILE := libjpeg-turbo-$(libjpeg-turbo_VERSION).tar.gz libjpeg-turbo_URL := https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$(libjpeg-turbo_VERSION)/$(libjpeg-turbo_FILE) +# upstream version is 0.21.1 +libraw_VERSION := 0.21.4 +libraw_CHECKSUM := 6be43f19397e43214ff56aab056bf3ff4925ca14012ce5a1538a172406a09e63 +libraw_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/libraw-[0-9]*.patch))) +libraw_SUBDIR := LibRaw-$(libraw_VERSION) +libraw_FILE := LibRaw-$(libraw_VERSION).tar.gz +libraw_URL := https://www.libraw.org/data/$(libraw_FILE) + # upstream version is 2.7.1 # needed by nip4 gsl_VERSION := 2.8 @@ -180,6 +188,7 @@ glib_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST))) harfbuzz_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/harfbuzz-[0-9]*.patch))) lcms_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/lcms-[0-9]*.patch))) libjpeg-turbo_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/libjpeg-turbo-[0-9]*.patch))) +libraw_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/libraw-[0-9]*.patch))) libxml2_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/libxml2-[0-9]*.patch))) meson_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/meson-[0-9]*.patch))) mingw-w64_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/mingw-w64-[0-9]*.patch))) @@ -205,6 +214,7 @@ zlib_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST))) # Removed: jasper, libiconv # Replaced: jpeg with libjpeg-turbo # lcms: +# Added: meson-wrapper # Removed: jpeg, tiff # libtiff: # Replaced: jpeg with libjpeg-turbo @@ -219,7 +229,7 @@ zlib_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST))) # Added: libjpeg-turbo, lcms # Removed: boost, curl, qt6-qtbase, libwebp # librsvg: -# Added: libxml2, rust, $(BUILD)~cargo-c +# Added: meson-wrapper, libxml2, rust, $(BUILD)~cargo-c # Removed: gdk-pixbuf, libcroco, libgsf # Cairo: # Removed: lzo @@ -227,7 +237,12 @@ zlib_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST))) # Removed: hdf5 # libjpeg-turbo: # Replaced: yasm with $(BUILD)~nasm +# libraw: +# Added: zlib +# Replaced: jpeg with libjpeg-turbo +# Removed: jasper # libxml2: +# Added: meson-wrapper # Removed: libiconv, xz, zlib # Fontconfig: # Added: meson-wrapper @@ -246,17 +261,18 @@ freetype_DEPS := $(subst brotli bzip2,meson-wrapper,$(freetype_DEPS)) freetype-bootstrap_DEPS := $(subst brotli bzip2,meson-wrapper,$(freetype-bootstrap_DEPS)) glib_DEPS := cc meson-wrapper gettext libffi zlib gdk-pixbuf_DEPS := cc meson-wrapper glib libjpeg-turbo libpng tiff -lcms_DEPS := $(filter-out jpeg tiff ,$(lcms_DEPS)) +lcms_DEPS := $(subst jpeg tiff,meson-wrapper,$(lcms_DEPS)) tiff_DEPS := cc libjpeg-turbo libwebp zlib imagemagick_DEPS := cc libxml2 openjpeg lcms libjpeg-turbo graphicsmagick_DEPS := $(imagemagick_DEPS) openexr_DEPS := cc imath zlib poppler_DEPS := cc cairo libjpeg-turbo freetype glib openjpeg lcms libpng tiff zlib -librsvg_DEPS := cc cairo glib pango libxml2 rust $(BUILD)~cargo-c +librsvg_DEPS := cc meson-wrapper cairo glib pango libxml2 rust $(BUILD)~cargo-c cairo_DEPS := $(filter-out lzo ,$(cairo_DEPS)) matio_DEPS := $(filter-out hdf5 ,$(matio_DEPS)) libjpeg-turbo_DEPS := $(subst yasm,$(BUILD)~nasm,$(libjpeg-turbo_DEPS)) -libxml2_DEPS := cc +libraw_DEPS := cc libjpeg-turbo lcms zlib +libxml2_DEPS := cc meson-wrapper fontconfig_DEPS := cc meson-wrapper expat freetype-bootstrap libexif_DEPS := $(filter-out gettext,$(libexif_DEPS)) harfbuzz_DEPS := cc meson-wrapper cairo freetype-bootstrap glib @@ -477,6 +493,24 @@ define libjpeg-turbo_BUILD $(MAKE) -C '$(BUILD_DIR)' -j 1 $(subst -,/,$(INSTALL_STRIP_LIB)) endef +# build without jasper, openmp and examples +define libraw_BUILD + # autoreconf to get updated libtool files for clang + cd '$(SOURCE_DIR)' && autoreconf -fi + + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-examples \ + --disable-openmp \ + --disable-jasper \ + --enable-jpeg \ + --enable-zlib \ + --enable-lcms + + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_LIB) +endef + # build with the Meson build system # build with -Dnls=disabled define fontconfig_BUILD diff --git a/build/patches/libraw-0.21-fixes.patch b/build/patches/libraw-0.21-fixes.patch new file mode 100644 index 00000000..1e912efd --- /dev/null +++ b/build/patches/libraw-0.21-fixes.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Sun, 27 Jul 2025 14:00:00 +0200 +Subject: [PATCH 1/1] Make libstdc++ a private dependency + +Prevent downstream packages that depend on LibRaw from being +required to link explicitly against libstdc++. + +diff --git a/libraw.pc.in b/libraw.pc.in +index 1111111..2222222 100644 +--- a/libraw.pc.in ++++ b/libraw.pc.in +@@ -7,6 +7,6 @@ Name: libraw + Description: Raw image decoder library (non-thread-safe) + Requires: @PACKAGE_REQUIRES@ + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@ +-Libs.private: @PACKAGE_LIBS_PRIVATE@ ++Libs: -L${libdir} -lraw@PC_OPENMP@ ++Libs.private: @PACKAGE_LIBS_PRIVATE@ -lstdc++ + Cflags: -I${includedir}/libraw -I${includedir} +diff --git a/libraw_r.pc.in b/libraw_r.pc.in +index 1111111..2222222 100644 +--- a/libraw_r.pc.in ++++ b/libraw_r.pc.in +@@ -7,6 +7,6 @@ Name: libraw + Description: Raw image decoder library (thread-safe) + Requires: @PACKAGE_REQUIRES@ + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lraw_r -lstdc++@PC_OPENMP@ +-Libs.private: @PACKAGE_LIBS_PRIVATE@ ++Libs: -L${libdir} -lraw_r@PC_OPENMP@ ++Libs.private: @PACKAGE_LIBS_PRIVATE@ -lstdc++ + Cflags: -I${includedir}/libraw -I${includedir} diff --git a/build/patches/libtool-2-fixes.patch b/build/patches/libtool-2-fixes.patch new file mode 100644 index 00000000..fdca2f2b --- /dev/null +++ b/build/patches/libtool-2-fixes.patch @@ -0,0 +1,63 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Manoj Gupta +Date: Wed, 10 Oct 2018 10:50:23 +0300 +Subject: [PATCH 1/2] Pick up clang_rt static archives compiler internal libraries + +Libtool checks only for libraries linked as -l* when trying to +find internal compiler libraries. Clang, however uses the absolute +path to link its internal libraries e.g. compiler_rt. This patch +handles clang's statically linked libraries when finding internal +compiler libraries. +https://crbug.com/749263 +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=e606cd2358dd526d79837ce9f98da159c1d02bf7] + +diff --git a/aclocal/libtool.m4 b/aclocal/libtool.m4 +index 1111111..2222222 100644 +--- a/aclocal/libtool.m4 ++++ b/aclocal/libtool.m4 +@@ -7581,7 +7581,7 @@ if AC_TRY_EVAL(ac_compile); then + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in + +- -L* | -R* | -l*) ++ -L* | -R* | -l* | */libclang_rt.*.a) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test x-L = "$p" || + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Mon, 19 Aug 2019 13:34:51 +0300 +Subject: [PATCH 2/2] Allow statically linking compiler support libraries when + linking a library + +For cases with deplibs_check_method="file_magic ..." (as it is for mingw), +there were previously no way that a static library could be accepted +here. + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=2f505131b5f29b0de6338bf9d13b7ceadf617d96] + +diff --git a/libtool/build-aux/ltmain.sh b/libtool/build-aux/ltmain.sh +index 1111111..2222222 100644 +--- a/libtool/build-aux/ltmain.sh ++++ b/libtool/build-aux/ltmain.sh +@@ -8045,8 +8045,15 @@ func_mode_link () + fi + case $linkmode in + lib) +- # Linking convenience modules into shared libraries is allowed, +- # but linking other static libraries is non-portable. ++ # Linking convenience modules and compiler provided static libraries ++ # into shared libraries is allowed, but linking other static ++ # libraries is non-portable. ++ case $deplib in ++ */libgcc*.$libext | */libclang_rt*.$libext) ++ deplibs="$deplib $deplibs" ++ continue ++ ;; ++ esac + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) diff --git a/build/plugins/jpegli/overrides.mk b/build/plugins/jpegli/overrides.mk index 2c7d5a12..e9f72eaf 100644 --- a/build/plugins/jpegli/overrides.mk +++ b/build/plugins/jpegli/overrides.mk @@ -6,6 +6,7 @@ IS_JPEGLI := $(true) gdk-pixbuf_DEPS := $(subst libjpeg-turbo,jpegli,$(gdk-pixbuf_DEPS)) imagemagick_DEPS := $(subst libjpeg-turbo,jpegli,$(imagemagick_DEPS)) graphicsmagick_DEPS := $(subst libjpeg-turbo,jpegli,$(graphicsmagick_DEPS)) +libraw_DEPS := $(subst libjpeg-turbo,jpegli,$(libraw_DEPS)) openslide_DEPS := $(subst libjpeg-turbo,jpegli,$(openslide_DEPS)) poppler_DEPS := $(subst libjpeg-turbo,jpegli,$(poppler_DEPS)) tiff_DEPS := $(subst libjpeg-turbo,jpegli,$(tiff_DEPS)) diff --git a/build/plugins/mozjpeg/overrides.mk b/build/plugins/mozjpeg/overrides.mk index 061fc149..863b9be0 100644 --- a/build/plugins/mozjpeg/overrides.mk +++ b/build/plugins/mozjpeg/overrides.mk @@ -6,6 +6,7 @@ IS_MOZJPEG := $(true) gdk-pixbuf_DEPS := $(subst libjpeg-turbo,mozjpeg,$(gdk-pixbuf_DEPS)) imagemagick_DEPS := $(subst libjpeg-turbo,mozjpeg,$(imagemagick_DEPS)) graphicsmagick_DEPS := $(subst libjpeg-turbo,mozjpeg,$(graphicsmagick_DEPS)) +libraw_DEPS := $(subst libjpeg-turbo,mozjpeg,$(libraw_DEPS)) openslide_DEPS := $(subst libjpeg-turbo,mozjpeg,$(openslide_DEPS)) poppler_DEPS := $(subst libjpeg-turbo,mozjpeg,$(poppler_DEPS)) tiff_DEPS := $(subst libjpeg-turbo,mozjpeg,$(tiff_DEPS)) diff --git a/build/plugins/zlib-ng/overrides.mk b/build/plugins/zlib-ng/overrides.mk index 63b312dc..0170b757 100644 --- a/build/plugins/zlib-ng/overrides.mk +++ b/build/plugins/zlib-ng/overrides.mk @@ -12,6 +12,7 @@ lcms_DEPS := $(subst zlib,zlib-ng,$(lcms_DEPS)) libarchive_DEPS := $(subst zlib,zlib-ng,$(libarchive_DEPS)) libexif_DEPS := $(subst zlib,zlib-ng,$(libexif_DEPS)) libpng_DEPS := $(subst zlib,zlib-ng,$(libpng_DEPS)) +libraw_DEPS := $(subst zlib,zlib-ng,$(libraw_DEPS)) libspng_DEPS := $(subst zlib,zlib-ng,$(libspng_DEPS)) matio_DEPS := $(subst zlib,zlib-ng,$(matio_DEPS)) nifticlib_DEPS := $(subst zlib,zlib-ng,$(nifticlib_DEPS)) diff --git a/build/vips-all.mk b/build/vips-all.mk index 6182043b..c551221f 100644 --- a/build/vips-all.mk +++ b/build/vips-all.mk @@ -12,7 +12,7 @@ $(PKG)_DEPS := cc meson-wrapper libwebp librsvg glib pango libarchive \ libjpeg-turbo tiff lcms libexif libheif libspng \ libimagequant highway imagemagick matio openexr \ cfitsio nifticlib poppler fftw openslide libjxl cgif \ - libraw + libraw define $(PKG)_PRE_CONFIGURE # Copy some files to the packaging directory @@ -61,6 +61,7 @@ define $(PKG)_PRE_CONFIGURE printf ' "png": "$(libpng_VERSION)",\n'; \ printf ' "poppler": "$(poppler_VERSION)",\n'; \ $(if $(IS_INTL_DUMMY),printf ' "proxy-libintl": "$(proxy-libintl_VERSION)"$(comma)\n';) \ + printf ' "raw": "$(libraw_VERSION)",\n'; \ printf ' "rsvg": "$(librsvg_VERSION)",\n'; \ printf ' "spng": "$(libspng_VERSION)",\n'; \ printf ' "sqlite": "$(sqlite_VERSION)",\n'; \ diff --git a/container/Dockerfile b/container/Dockerfile index b1f37328..ea5e8abb 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -11,6 +11,9 @@ ARG DEBUG ARG GIT_COMMIT ARG PLUGIN_DIRS +# libtool-specific patches for clang +RUN patch -p1 -d /usr/share < /data/patches/libtool-2-fixes.patch + RUN \ if [ "$DEBUG" = true ]; then \ cp -f /data/settings/debug.mk settings.mk; \ From 4c1e23af4b3f6235078ba907951268f79cd44564 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 27 Jul 2025 14:14:35 +0200 Subject: [PATCH 04/16] Fix build of test releases The subdirectory inside the tarball lacks the test release suffix. --- build/vips-all.mk | 6 +++--- build/vipsdisp.mk | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build/vips-all.mk b/build/vips-all.mk index c551221f..b6fac9df 100644 --- a/build/vips-all.mk +++ b/build/vips-all.mk @@ -3,10 +3,10 @@ $(PKG)_WEBSITE := https://libvips.github.io/libvips/ $(PKG)_DESCR := A fast image processing library with low memory needs. $(PKG)_IGNORE := $(PKG)_VERSION := 8.18.0-test1 -$(PKG)_CHECKSUM := 4d8c3325922c5300253d7594507a8f1d3caf8eed70dfb66cc7eb2cbed65bb5ca +$(PKG)_CHECKSUM := 242eaa2c195fd5a3021e5daaa4448cdbfa5b9702ec4377cbb9b2b18c4f542163 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/vips-[0-9]*.patch))) -$(PKG)_GH_CONF := libvips/libvips/releases,v,,,,.tar.xz -$(PKG)_SUBDIR := vips-$($(PKG)_VERSION) +$(PKG)_GH_CONF := libvips/libvips/releases,v,,,,-test1.tar.xz +$(PKG)_SUBDIR := vips-$(firstword $(subst -, ,$($(PKG)_VERSION))) $(PKG)_FILE := vips-$($(PKG)_VERSION).tar.xz $(PKG)_DEPS := cc meson-wrapper libwebp librsvg glib pango libarchive \ libjpeg-turbo tiff lcms libexif libheif libspng \ diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index a04e9337..adda92a5 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -3,9 +3,11 @@ $(PKG)_WEBSITE := https://github.com/jcupitt/vipsdisp $(PKG)_DESCR := Tiny libvips / gtk+4 image viewer $(PKG)_IGNORE := $(PKG)_VERSION := 4.1.0-rc1 -$(PKG)_CHECKSUM := +$(PKG)_CHECKSUM := f5e51331c848a0e10bf80fb6d29753a393fb6555be38ccb4e37b4a129fe0f3b0 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) -$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,.tar.xz +$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,-rc1.tar.xz +$(PKG)_SUBDIR := $(PKG)-$(firstword $(subst -, ,$($(PKG)_VERSION))) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz $(PKG)_DEPS := cc meson-wrapper gtk4 vips-all define $(PKG)_PRE_CONFIGURE From 69abc58f22834a4dbc4d0b33653180fdcd620210 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 27 Jul 2025 15:26:30 +0100 Subject: [PATCH 05/16] update to 4.1.0 final --- build/vipsdisp.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index adda92a5..7e9b1f0b 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -2,8 +2,8 @@ PKG := vipsdisp $(PKG)_WEBSITE := https://github.com/jcupitt/vipsdisp $(PKG)_DESCR := Tiny libvips / gtk+4 image viewer $(PKG)_IGNORE := -$(PKG)_VERSION := 4.1.0-rc1 -$(PKG)_CHECKSUM := f5e51331c848a0e10bf80fb6d29753a393fb6555be38ccb4e37b4a129fe0f3b0 +$(PKG)_VERSION := 4.1.0 +$(PKG)_CHECKSUM := 51a1105f27e495fdd8e55a8628c4f688f28f900475efc479c9a7202ba59f09c2 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) $(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,-rc1.tar.xz $(PKG)_SUBDIR := $(PKG)-$(firstword $(subst -, ,$($(PKG)_VERSION))) From 0e2feb2a31dea4d77c6f8e78caaffe0247253e84 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 27 Jul 2025 16:55:17 +0200 Subject: [PATCH 06/16] fixup! update to 4.1.0 final --- build/vipsdisp.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index 7e9b1f0b..f1f58436 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -5,9 +5,7 @@ $(PKG)_IGNORE := $(PKG)_VERSION := 4.1.0 $(PKG)_CHECKSUM := 51a1105f27e495fdd8e55a8628c4f688f28f900475efc479c9a7202ba59f09c2 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) -$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,-rc1.tar.xz -$(PKG)_SUBDIR := $(PKG)-$(firstword $(subst -, ,$($(PKG)_VERSION))) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz +$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,.tar.xz $(PKG)_DEPS := cc meson-wrapper gtk4 vips-all define $(PKG)_PRE_CONFIGURE From a43a0b6a0cd907e034fc7cc75ae40de2aa6c4fb9 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 27 Jul 2025 22:51:44 +0200 Subject: [PATCH 07/16] Revise GTK patch --- .../plugins/gtk4/patches/gtk-4-mr-8494.patch | 330 ++++++++++++++++-- 1 file changed, 304 insertions(+), 26 deletions(-) mode change 100644 => 100755 build/plugins/gtk4/patches/gtk-4-mr-8494.patch diff --git a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch old mode 100644 new mode 100755 index 651efbaf..9f1fb821 --- a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch +++ b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 1 Oct 2024 20:18:58 +0200 -Subject: [PATCH 01/10] gsk: Add gsk_rect_snap_to_grid_shrink() +Subject: [PATCH 01/13] gsk: Add gsk_rect_snap_to_grid_shrink() And rename gsk_rect_snap_to_grid() to gsk_rect_snap_to_grid_grow(). @@ -178,7 +178,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 05:10:37 +0100 -Subject: [PATCH 02/10] API: Add GskRectSnap +Subject: [PATCH 02/13] API: Add GskRectSnap A flags property to snap rectangles @@ -548,7 +548,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 16:38:49 +0100 -Subject: [PATCH 03/10] gtk: Add gtk_snapshot_set_snap() +Subject: [PATCH 03/13] gtk: Add gtk_snapshot_set_snap() Sets a snap mode to use for all future snappable nodes. @@ -556,6 +556,9 @@ Sets a snap mode to use for all future snappable nodes. Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8494] +[Fix: s/GDK_AVAILABLE_IN_4_20/GDK_AVAILABLE_IN_4_18/] +Signed-off-by: Kleis Auke Wolthuizen + diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 1111111..2222222 100644 --- a/gtk/gtksnapshot.c @@ -942,10 +945,130 @@ index 1111111..2222222 100644 void gtk_snapshot_transform (GtkSnapshot *snapshot, GskTransform *transform); +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Otte +Date: Wed, 19 Mar 2025 05:13:25 +0100 +Subject: [PATCH 04/13] gsk: Add gsk_texture_node_new_snapped() + +Adds a new function to construct a texture node with a hint on how to snap +to the pixel grid. + +(cherry picked from commit bbc4f2892de7f01c73a705d898307bece5edfe69) + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8494] + +[Fix: s/GDK_AVAILABLE_IN_4_20/GDK_AVAILABLE_IN_4_18/] +Signed-off-by: Kleis Auke Wolthuizen + +diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h +index 1111111..2222222 100644 +--- a/gsk/gskrendernode.h ++++ b/gsk/gskrendernode.h +@@ -226,8 +226,14 @@ GType gsk_texture_node_get_type (void) G_GNUC_CO + GDK_AVAILABLE_IN_ALL + GskRenderNode * gsk_texture_node_new (GdkTexture *texture, + const graphene_rect_t *bounds); ++GDK_AVAILABLE_IN_4_18 ++GskRenderNode * gsk_texture_node_new_snapped (GdkTexture *texture, ++ const graphene_rect_t *bounds, ++ GskRectSnap snap); + GDK_AVAILABLE_IN_ALL + GdkTexture * gsk_texture_node_get_texture (const GskRenderNode *node) G_GNUC_PURE; ++GDK_AVAILABLE_IN_4_18 ++GskRectSnap gsk_texture_node_get_snap (const GskRenderNode *node) G_GNUC_PURE; + + GDK_AVAILABLE_IN_4_10 + GType gsk_texture_scale_node_get_type (void) G_GNUC_CONST; +diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c +index 1111111..2222222 100644 +--- a/gsk/gskrendernodeimpl.c ++++ b/gsk/gskrendernodeimpl.c +@@ -2701,6 +2701,7 @@ struct _GskTextureNode + GskRenderNode render_node; + + GdkTexture *texture; ++ GskRectSnap snap; + }; + + static void +@@ -2827,6 +2828,7 @@ gsk_texture_node_diff (GskRenderNode *node1, + cairo_region_t *sub; + + if (!gsk_rect_equal (&node1->bounds, &node2->bounds) || ++ self1->snap != self2->snap || + gdk_texture_get_width (self1->texture) != gdk_texture_get_width (self2->texture) || + gdk_texture_get_height (self1->texture) != gdk_texture_get_height (self2->texture)) + { +@@ -2877,6 +2879,24 @@ gsk_texture_node_get_texture (const GskRenderNode *node) + return self->texture; + } + ++/** ++ * gsk_texture_node_get_snap: ++ * @node: (type GskInsetShadowNode): a `GskRenderNode` for a texture ++ * ++ * Retrieves the snap value used when creating this node. ++ * ++ * Returns: the snap value ++ * ++ * Since: 4.18 ++ */ ++GskRectSnap ++gsk_texture_node_get_snap (const GskRenderNode *node) ++{ ++ const GskTextureNode *self = (const GskTextureNode *) node; ++ ++ return self->snap; ++} ++ + /** + * gsk_texture_node_new: + * @texture: the `GdkTexture` +@@ -2894,6 +2914,32 @@ gsk_texture_node_get_texture (const GskRenderNode *node) + GskRenderNode * + gsk_texture_node_new (GdkTexture *texture, + const graphene_rect_t *bounds) ++{ ++ return gsk_texture_node_new_snapped (texture, bounds, GSK_RECT_SNAP_NONE); ++} ++ ++/** ++ * gsk_texture_node_new_snapped: ++ * @texture: the `GdkTexture` ++ * @bounds: the rectangle to render the texture into ++ * @snap: the snap value ++ * ++ * Creates a `GskRenderNode` that will render the given ++ * @texture into the area given by @bounds and aligned to ++ * the pixel grid according to @snap. ++ * ++ * Note that GSK applies linear filtering when textures are ++ * scaled and transformed. See [class@Gsk.TextureScaleNode] ++ * for a way to influence filtering. ++ * ++ * Returns: (transfer full) (type GskTextureNode): A new `GskRenderNode` ++ * ++ * Since: 4.18 ++ */ ++GskRenderNode * ++gsk_texture_node_new_snapped (GdkTexture *texture, ++ const graphene_rect_t *bounds, ++ GskRectSnap snap) + { + GskTextureNode *self; + GskRenderNode *node; +@@ -2908,6 +2954,7 @@ gsk_texture_node_new (GdkTexture *texture, + node->is_hdr = color_state_is_hdr (gdk_texture_get_color_state (texture)); + + self->texture = g_object_ref (texture); ++ self->snap = snap; + gsk_rect_init_from_rect (&node->bounds, bounds); + gsk_rect_normalize (&node->bounds); + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 05:27:27 +0100 -Subject: [PATCH 04/10] nodeparser: Add support for texture snapping +Subject: [PATCH 05/13] nodeparser: Add support for texture snapping (cherry picked from commit 17487e8bd81b2c2165e1790736dbe10f06a0b791) @@ -1015,7 +1138,29 @@ index 1111111..2222222 100644 static PangoFont * font_from_string (PangoFontMap *fontmap, const char *string, -@@ -3857,6 +3903,58 @@ append_enum_param (Printer *p, +@@ -2239,9 +2285,11 @@ parse_texture_node (GtkCssParser *parser, + { + graphene_rect_t bounds = GRAPHENE_RECT_INIT (0, 0, 50, 50); + GdkTexture *texture = NULL; ++ GskRectSnap snap = GSK_RECT_SNAP_NONE; + const Declaration declarations[] = { + { "bounds", parse_rect, NULL, &bounds }, +- { "texture", parse_texture, clear_texture, &texture } ++ { "texture", parse_texture, clear_texture, &texture }, ++ { "snap", parse_rect_snap, NULL, &snap }, + }; + GskRenderNode *node; + +@@ -2250,7 +2298,7 @@ parse_texture_node (GtkCssParser *parser, + if (texture == NULL) + texture = create_default_texture (); + +- node = gsk_texture_node_new (texture, &bounds); ++ node = gsk_texture_node_new_snapped (texture, &bounds, snap); + g_object_unref (texture); + + return node; +@@ -3857,6 +3905,58 @@ append_enum_param (Printer *p, g_string_append_c (p->str, '\n'); } @@ -1074,11 +1219,113 @@ index 1111111..2222222 100644 static void append_vec4_param (Printer *p, const char *param_name, +@@ -4726,6 +4826,7 @@ render_node_print (Printer *p, + + append_rect_param (p, "bounds", &node->bounds); + append_texture_param (p, "texture", gsk_texture_node_get_texture (node)); ++ append_snap_param (p, "snap", gsk_texture_node_get_snap (node)); + + end_node (p); + } +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Otte +Date: Wed, 19 Mar 2025 05:27:52 +0100 +Subject: [PATCH 06/13] gpu: Add support for texture snapping + +(cherry picked from commit 35137d4983e8a9a9ed49d767b49de288e9cfab44) + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8494] + +diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c +index 1111111..2222222 100644 +--- a/gsk/gpu/gskgpunodeprocessor.c ++++ b/gsk/gpu/gskgpunodeprocessor.c +@@ -2137,6 +2137,7 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, + GskGpuImage *image; + GdkTexture *texture; + gboolean should_mipmap; ++ graphene_rect_t bounds; + + texture = gsk_texture_node_get_texture (node); + should_mipmap = texture_node_should_mipmap (node, self->frame, &self->scale); +@@ -2169,6 +2170,12 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, + return; + } + ++ gsk_rect_snap_to_grid (&node->bounds, ++ gsk_texture_node_get_snap (node), ++ &self->scale, ++ &self->offset, ++ &bounds); ++ + if (should_mipmap) + { + if ((gsk_gpu_image_get_flags (image) & (GSK_GPU_IMAGE_STRAIGHT_ALPHA | GSK_GPU_IMAGE_CAN_MIPMAP)) != GSK_GPU_IMAGE_CAN_MIPMAP || +@@ -2189,8 +2196,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, + image, + image_cs, + GSK_GPU_SAMPLER_MIPMAP_DEFAULT, +- &node->bounds, +- &node->bounds); ++ &bounds, ++ &bounds); + } + else + { +@@ -2198,8 +2205,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, + image, + image_cs, + GSK_GPU_SAMPLER_DEFAULT, +- &node->bounds, +- &node->bounds); ++ &bounds, ++ &bounds); + } + + g_object_unref (image); +@@ -2242,6 +2249,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, + GdkColorState *image_cs; + GskGpuImage *image; + gboolean should_mipmap; ++ graphene_rect_t bounds; + + if ((flags & GSK_GPU_AS_IMAGE_EXACT_SIZE) && + !gsk_rect_equal (clip_bounds, &node->bounds)) +@@ -2249,6 +2257,11 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, + + should_mipmap = texture_node_should_mipmap (node, frame, scale); + image = gsk_gpu_lookup_texture (frame, ccs, texture, FALSE, &image_cs); ++ gsk_rect_snap_to_grid (&node->bounds, ++ gsk_texture_node_get_snap (node), ++ scale, ++ &clip_bounds->origin, ++ &bounds); + + if (image == NULL) + { +@@ -2256,7 +2269,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, + ccs, + clip_bounds, + scale, +- &node->bounds, ++ &bounds, + gsk_texture_node_get_texture (node), + should_mipmap ? GSK_SCALING_FILTER_TRILINEAR : GSK_SCALING_FILTER_LINEAR); + *out_bounds = *clip_bounds; +@@ -2278,7 +2291,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, + ccs); + } + +- *out_bounds = node->bounds; ++ *out_bounds = bounds; + return image; + } + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 16:37:35 +0100 -Subject: [PATCH 05/10] inspector: Print texture snap +Subject: [PATCH 07/13] inspector: Print texture snap It's just the snap flag as hex, we might want to do something smarter in the future. @@ -1115,11 +1362,42 @@ index 1111111..2222222 100644 static void populate_render_node_properties (GListStore *store, GskRenderNode *node, +@@ -1096,6 +1113,7 @@ populate_render_node_properties (GListStore *store, + GdkTexture *texture = gsk_texture_node_get_texture (node); + + add_texture_rows (store, texture); ++ add_snap_row (store, "Snap", gsk_texture_node_get_snap (node)); + } + break; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sat, 7 Jun 2025 21:39:26 -0400 +Subject: [PATCH 08/13] gtk: Apply snap to texture nodes + +(cherry picked from commit c9ee5d404137d8424973c3a2c483b9ef56437148) + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8494] + +diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c +index 1111111..2222222 100644 +--- a/gtk/gtksnapshot.c ++++ b/gtk/gtksnapshot.c +@@ -2437,7 +2437,8 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, + + gtk_snapshot_ensure_affine (snapshot, &scale_x, &scale_y, &dx, &dy); + gtk_graphene_rect_scale_affine (bounds, scale_x, scale_y, dx, dy, &real_bounds); +- node = gsk_texture_node_new (texture, &real_bounds); ++ state = gtk_snapshot_get_current_state (snapshot); ++ node = gsk_texture_node_new_snapped (texture, &real_bounds, state->snap); + + gtk_snapshot_append_node_internal (snapshot, node); + } From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Jun 2025 21:36:02 -0400 -Subject: [PATCH 06/10] Add gsk_texture_scale_node_new_snapped +Subject: [PATCH 09/13] Add gsk_texture_scale_node_new_snapped (cherry picked from commit 11eb0be32943a56fbdf852233e9a8fe15b52824b) @@ -1132,7 +1410,7 @@ diff --git a/gsk/gskrendernode.h b/gsk/gskrendernode.h index 1111111..2222222 100644 --- a/gsk/gskrendernode.h +++ b/gsk/gskrendernode.h -@@ -235,6 +235,13 @@ GDK_AVAILABLE_IN_4_10 +@@ -241,6 +241,13 @@ GDK_AVAILABLE_IN_4_10 GskRenderNode * gsk_texture_scale_node_new (GdkTexture *texture, const graphene_rect_t *bounds, GskScalingFilter filter); @@ -1150,7 +1428,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -2932,6 +2932,8 @@ struct _GskTextureScaleNode +@@ -2979,6 +2979,8 @@ struct _GskTextureScaleNode GdkTexture *texture; GskScalingFilter filter; @@ -1159,7 +1437,7 @@ index 1111111..2222222 100644 }; static void -@@ -3018,6 +3020,7 @@ gsk_texture_scale_node_diff (GskRenderNode *node1, +@@ -3065,6 +3067,7 @@ gsk_texture_scale_node_diff (GskRenderNode *node1, if (!gsk_rect_equal (&node1->bounds, &node2->bounds) || self1->filter != self2->filter || @@ -1167,7 +1445,7 @@ index 1111111..2222222 100644 gdk_texture_get_width (self1->texture) != gdk_texture_get_width (self2->texture) || gdk_texture_get_height (self1->texture) != gdk_texture_get_height (self2->texture)) { -@@ -3088,6 +3091,24 @@ gsk_texture_scale_node_get_filter (const GskRenderNode *node) +@@ -3135,6 +3138,24 @@ gsk_texture_scale_node_get_filter (const GskRenderNode *node) return self->filter; } @@ -1192,7 +1470,7 @@ index 1111111..2222222 100644 /** * gsk_texture_scale_node_new: * @texture: the texture to scale -@@ -3115,6 +3136,43 @@ GskRenderNode * +@@ -3162,6 +3183,43 @@ GskRenderNode * gsk_texture_scale_node_new (GdkTexture *texture, const graphene_rect_t *bounds, GskScalingFilter filter) @@ -1236,7 +1514,7 @@ index 1111111..2222222 100644 { GskTextureScaleNode *self; GskRenderNode *node; -@@ -3134,6 +3192,7 @@ gsk_texture_scale_node_new (GdkTexture *texture, +@@ -3181,6 +3239,7 @@ gsk_texture_scale_node_new (GdkTexture *texture, gsk_rect_init_from_rect (&node->bounds, bounds); gsk_rect_normalize (&node->bounds); self->filter = filter; @@ -1247,7 +1525,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Jun 2025 21:36:20 -0400 -Subject: [PATCH 07/10] nodeparser: Support texture scale snapping +Subject: [PATCH 10/13] nodeparser: Support texture scale snapping (cherry picked from commit ce64a3bff28736497a546ba7bde9aa144c0f64ce) @@ -1257,7 +1535,7 @@ diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c -@@ -2309,10 +2309,12 @@ parse_texture_scale_node (GtkCssParser *parser, +@@ -2311,10 +2311,12 @@ parse_texture_scale_node (GtkCssParser *parser, graphene_rect_t bounds = GRAPHENE_RECT_INIT (0, 0, 50, 50); GdkTexture *texture = NULL; GskScalingFilter filter = GSK_SCALING_FILTER_LINEAR; @@ -1271,7 +1549,7 @@ index 1111111..2222222 100644 }; GskRenderNode *node; -@@ -2321,7 +2323,7 @@ parse_texture_scale_node (GtkCssParser *parser, +@@ -2323,7 +2325,7 @@ parse_texture_scale_node (GtkCssParser *parser, if (texture == NULL) texture = create_default_texture (); @@ -1280,7 +1558,7 @@ index 1111111..2222222 100644 g_object_unref (texture); return node; -@@ -4850,6 +4852,8 @@ render_node_print (Printer *p, +@@ -4853,6 +4855,8 @@ render_node_print (Printer *p, } append_texture_param (p, "texture", gsk_texture_scale_node_get_texture (node)); @@ -1293,7 +1571,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Apr 2025 16:10:24 +0200 -Subject: [PATCH 08/10] gpu: Snap texture scale nodes +Subject: [PATCH 11/13] gpu: Snap texture scale nodes (cherry picked from commit 53323886f9ef1d798eb2c1cad8c5d8166c9c9d42) @@ -1303,7 +1581,7 @@ diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 1111111..2222222 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c -@@ -2291,6 +2291,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2304,6 +2304,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, GdkColorState *image_cs; GskScalingFilter scaling_filter; gboolean need_mipmap, need_offscreen; @@ -1311,7 +1589,7 @@ index 1111111..2222222 100644 texture = gsk_texture_scale_node_get_texture (node); scaling_filter = gsk_texture_scale_node_get_filter (node); -@@ -2354,6 +2355,12 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2367,6 +2368,12 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, return; } @@ -1324,7 +1602,7 @@ index 1111111..2222222 100644 if ((gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_STRAIGHT_ALPHA) || (need_mipmap && !(gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_CAN_MIPMAP)) || !gdk_color_state_equal (image_cs, self->ccs)) -@@ -2370,13 +2377,13 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2383,13 +2390,13 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, gsk_gpu_mipmap_op (self->frame, image); gsk_gpu_texture_op (self->frame, @@ -1345,7 +1623,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Apr 2025 16:04:49 +0200 -Subject: [PATCH 09/10] inspector: Show snap for texture scale nodes +Subject: [PATCH 12/13] inspector: Show snap for texture scale nodes (cherry picked from commit a0dfe32dcb1f8d00f09b1a7e3d5d5dc736c248ef) @@ -1355,7 +1633,7 @@ diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 1111111..2222222 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c -@@ -1126,6 +1126,7 @@ populate_render_node_properties (GListStore *store, +@@ -1127,6 +1127,7 @@ populate_render_node_properties (GListStore *store, tmp = g_enum_to_string (GSK_TYPE_SCALING_FILTER, filter); add_text_row (store, "Filter", "%s", tmp); @@ -1367,7 +1645,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Apr 2025 16:04:26 +0200 -Subject: [PATCH 10/10] gtk: Apply snap to texture scale nodes +Subject: [PATCH 13/13] gtk: Apply snap to texture scale nodes (cherry picked from commit d4bc7a6200eecd90a2de80c50b1e88d626734e0c) @@ -1377,7 +1655,7 @@ diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 1111111..2222222 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c -@@ -2465,6 +2465,7 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, +@@ -2466,6 +2466,7 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, GskScalingFilter filter, const graphene_rect_t *bounds) { @@ -1385,7 +1663,7 @@ index 1111111..2222222 100644 GskRenderNode *node; g_return_if_fail (snapshot != NULL); -@@ -2472,7 +2473,11 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, +@@ -2473,7 +2474,11 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, g_return_if_fail (bounds != NULL); gtk_snapshot_ensure_identity (snapshot); From e32e17bc6f2c84177b08b79b66eb9af7583ac809 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sun, 27 Jul 2025 23:12:38 +0200 Subject: [PATCH 08/16] Remove execute permissions from GTK patch --- build/plugins/gtk4/patches/gtk-4-mr-8494.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 build/plugins/gtk4/patches/gtk-4-mr-8494.patch diff --git a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch old mode 100755 new mode 100644 From e546fa7749539255aab4c8332fcd8715e3993cb0 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 28 Jul 2025 14:21:52 +0200 Subject: [PATCH 09/16] Snap texture nodes in the fallback Cairo renderer --- .../plugins/gtk4/patches/gtk-4-mr-8494.patch | 123 ++++++++++++++++-- 1 file changed, 110 insertions(+), 13 deletions(-) diff --git a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch index 9f1fb821..c72dbe60 100644 --- a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch +++ b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 1 Oct 2024 20:18:58 +0200 -Subject: [PATCH 01/13] gsk: Add gsk_rect_snap_to_grid_shrink() +Subject: [PATCH 01/15] gsk: Add gsk_rect_snap_to_grid_shrink() And rename gsk_rect_snap_to_grid() to gsk_rect_snap_to_grid_grow(). @@ -178,7 +178,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 05:10:37 +0100 -Subject: [PATCH 02/13] API: Add GskRectSnap +Subject: [PATCH 02/15] API: Add GskRectSnap A flags property to snap rectangles @@ -548,7 +548,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 16:38:49 +0100 -Subject: [PATCH 03/13] gtk: Add gtk_snapshot_set_snap() +Subject: [PATCH 03/15] gtk: Add gtk_snapshot_set_snap() Sets a snap mode to use for all future snappable nodes. @@ -948,7 +948,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 05:13:25 +0100 -Subject: [PATCH 04/13] gsk: Add gsk_texture_node_new_snapped() +Subject: [PATCH 04/15] gsk: Add gsk_texture_node_new_snapped() Adds a new function to construct a texture node with a hint on how to snap to the pixel grid. @@ -1068,7 +1068,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 05:27:27 +0100 -Subject: [PATCH 05/13] nodeparser: Add support for texture snapping +Subject: [PATCH 05/15] nodeparser: Add support for texture snapping (cherry picked from commit 17487e8bd81b2c2165e1790736dbe10f06a0b791) @@ -1231,7 +1231,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 05:27:52 +0100 -Subject: [PATCH 06/13] gpu: Add support for texture snapping +Subject: [PATCH 06/15] gpu: Add support for texture snapping (cherry picked from commit 35137d4983e8a9a9ed49d767b49de288e9cfab44) @@ -1325,7 +1325,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 19 Mar 2025 16:37:35 +0100 -Subject: [PATCH 07/13] inspector: Print texture snap +Subject: [PATCH 07/15] inspector: Print texture snap It's just the snap flag as hex, we might want to do something smarter in the future. @@ -1373,7 +1373,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Jun 2025 21:39:26 -0400 -Subject: [PATCH 08/13] gtk: Apply snap to texture nodes +Subject: [PATCH 08/15] gtk: Apply snap to texture nodes (cherry picked from commit c9ee5d404137d8424973c3a2c483b9ef56437148) @@ -1397,7 +1397,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Jun 2025 21:36:02 -0400 -Subject: [PATCH 09/13] Add gsk_texture_scale_node_new_snapped +Subject: [PATCH 09/15] Add gsk_texture_scale_node_new_snapped (cherry picked from commit 11eb0be32943a56fbdf852233e9a8fe15b52824b) @@ -1525,7 +1525,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Jun 2025 21:36:20 -0400 -Subject: [PATCH 10/13] nodeparser: Support texture scale snapping +Subject: [PATCH 10/15] nodeparser: Support texture scale snapping (cherry picked from commit ce64a3bff28736497a546ba7bde9aa144c0f64ce) @@ -1571,7 +1571,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Apr 2025 16:10:24 +0200 -Subject: [PATCH 11/13] gpu: Snap texture scale nodes +Subject: [PATCH 11/15] gpu: Snap texture scale nodes (cherry picked from commit 53323886f9ef1d798eb2c1cad8c5d8166c9c9d42) @@ -1623,7 +1623,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Apr 2025 16:04:49 +0200 -Subject: [PATCH 12/13] inspector: Show snap for texture scale nodes +Subject: [PATCH 12/15] inspector: Show snap for texture scale nodes (cherry picked from commit a0dfe32dcb1f8d00f09b1a7e3d5d5dc736c248ef) @@ -1645,7 +1645,7 @@ index 1111111..2222222 100644 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Apr 2025 16:04:26 +0200 -Subject: [PATCH 13/13] gtk: Apply snap to texture scale nodes +Subject: [PATCH 13/15] gtk: Apply snap to texture scale nodes (cherry picked from commit d4bc7a6200eecd90a2de80c50b1e88d626734e0c) @@ -1676,3 +1676,100 @@ index 1111111..2222222 100644 gtk_snapshot_append_node_internal (snapshot, node); } + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Mon, 28 Jul 2025 13:43:15 +0200 +Subject: [PATCH 14/15] cairo: Snap texture nodes + +Upstream-Status: Pending + +diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c +index 1111111..2222222 100644 +--- a/gsk/gskrendernodeimpl.c ++++ b/gsk/gskrendernodeimpl.c +@@ -2789,6 +2789,7 @@ gsk_texture_node_draw (GskRenderNode *node, + cairo_pattern_t *pattern; + cairo_matrix_t matrix; + int width, height; ++ graphene_rect_t bounds; + + width = gdk_texture_get_width (self->texture); + height = gdk_texture_get_height (self->texture); +@@ -2802,19 +2803,21 @@ gsk_texture_node_draw (GskRenderNode *node, + pattern = cairo_pattern_create_for_surface (surface); + cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); + ++ gsk_rect_snap (&node->bounds, ++ gsk_texture_node_get_snap (node), ++ &bounds); ++ + cairo_matrix_init_scale (&matrix, +- width / node->bounds.size.width, +- height / node->bounds.size.height); +- cairo_matrix_translate (&matrix, +- -node->bounds.origin.x, +- -node->bounds.origin.y); ++ width / bounds.size.width, ++ height / bounds.size.height); ++ cairo_matrix_translate (&matrix, -bounds.origin.x, -bounds.origin.y); + cairo_pattern_set_matrix (pattern, &matrix); + + cairo_set_source (cr, pattern); + cairo_pattern_destroy (pattern); + cairo_surface_destroy (surface); + +- gdk_cairo_rect (cr, &node->bounds); ++ gdk_cairo_rect (cr, &bounds); + cairo_fill (cr); + } + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Mon, 28 Jul 2025 13:43:31 +0200 +Subject: [PATCH 15/15] cairo: Snap texture scale nodes + +Upstream-Status: Pending + +diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c +index 1111111..2222222 100644 +--- a/gsk/gskrendernodeimpl.c ++++ b/gsk/gskrendernodeimpl.c +@@ -3014,9 +3014,14 @@ gsk_texture_scale_node_draw (GskRenderNode *node, + cairo_t *cr2; + cairo_surface_t *surface2; + graphene_rect_t clip_rect; ++ graphene_rect_t bounds; ++ ++ gsk_rect_snap (&node->bounds, ++ gsk_texture_scale_node_get_snap (node), ++ &bounds); + + /* Make sure we draw the minimum region by using the clip */ +- gdk_cairo_rect (cr, &node->bounds); ++ gdk_cairo_rect (cr, &bounds); + cairo_clip (cr); + _graphene_rect_init_from_clip_extents (&clip_rect, cr); + if (clip_rect.size.width <= 0 || clip_rect.size.height <= 0) +@@ -3033,9 +3038,9 @@ gsk_texture_scale_node_draw (GskRenderNode *node, + cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); + + cairo_matrix_init_scale (&matrix, +- gdk_texture_get_width (self->texture) / node->bounds.size.width, +- gdk_texture_get_height (self->texture) / node->bounds.size.height); +- cairo_matrix_translate (&matrix, -node->bounds.origin.x, -node->bounds.origin.y); ++ gdk_texture_get_width (self->texture) / bounds.size.width, ++ gdk_texture_get_height (self->texture) / bounds.size.height); ++ cairo_matrix_translate (&matrix, -bounds.origin.x, -bounds.origin.y); + cairo_pattern_set_matrix (pattern, &matrix); + cairo_pattern_set_filter (pattern, filters[self->filter]); + +@@ -3043,7 +3048,7 @@ gsk_texture_scale_node_draw (GskRenderNode *node, + cairo_pattern_destroy (pattern); + cairo_surface_destroy (surface); + +- gdk_cairo_rect (cr2, &node->bounds); ++ gdk_cairo_rect (cr2, &bounds); + cairo_fill (cr2); + + cairo_destroy (cr2); From 14780e02d1d1004b202a1e4fb098f7784c5e1c36 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 28 Jul 2025 20:29:14 +0200 Subject: [PATCH 10/16] Try `gsk_cairo_rectangle_pixel_aligned()` --- build/plugins/gtk4/patches/gtk-4-mr-8494.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch index c72dbe60..ed5447ea 100644 --- a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch +++ b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch @@ -1747,7 +1747,7 @@ index 1111111..2222222 100644 /* Make sure we draw the minimum region by using the clip */ - gdk_cairo_rect (cr, &node->bounds); -+ gdk_cairo_rect (cr, &bounds); ++ gsk_cairo_rectangle_pixel_aligned (cr, &bounds); cairo_clip (cr); _graphene_rect_init_from_clip_extents (&clip_rect, cr); if (clip_rect.size.width <= 0 || clip_rect.size.height <= 0) From f35126cfdba4a8c94d038ee114b6064c72a3c50e Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 29 Jul 2025 11:49:07 +0200 Subject: [PATCH 11/16] Update GTK to 4.19.2 --- build/nip4.mk | 1 + build/plugins/gtk4/directx-headers.mk | 18 ++ build/plugins/gtk4/gtk4.mk | 6 +- .../plugins/gtk4/patches/gtk-4-mr-8494.patch | 303 +++++++++--------- build/vipsdisp.mk | 1 + packaging/package-gtk.sh | 4 +- 6 files changed, 182 insertions(+), 151 deletions(-) create mode 100644 build/plugins/gtk4/directx-headers.mk diff --git a/build/nip4.mk b/build/nip4.mk index 9c755956..53d9e4d5 100644 --- a/build/nip4.mk +++ b/build/nip4.mk @@ -10,6 +10,7 @@ $(PKG)_DEPS := cc meson-wrapper gtk4 gsl vips-all define $(PKG)_PRE_CONFIGURE (printf '{\n'; \ + printf ' "directx-headers": "$(directx-headers_VERSION)",\n'; \ printf ' "epoxy": "$(libepoxy_VERSION)",\n'; \ printf ' "graphene": "$(graphene_VERSION)",\n'; \ printf ' "gsl": "$(gsl_VERSION)",\n'; \ diff --git a/build/plugins/gtk4/directx-headers.mk b/build/plugins/gtk4/directx-headers.mk new file mode 100644 index 00000000..1856b8f9 --- /dev/null +++ b/build/plugins/gtk4/directx-headers.mk @@ -0,0 +1,18 @@ +PKG := directx-headers +$(PKG)_WEBSITE := https://github.com/microsoft/DirectX-Headers +$(PKG)_DESCR := Official DirectX headers available under an open source license +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.616.0 +$(PKG)_CHECKSUM := 125f492802939b40223bfccb83badd3f599af2d3449613d6cb893720607b9025 +$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) +$(PKG)_GH_CONF := microsoft/DirectX-Headers/tags,v +$(PKG)_DEPS := cc meson-wrapper + +define $(PKG)_BUILD + $(MXE_MESON_WRAPPER) \ + -Dbuild-test=false \ + '$(SOURCE_DIR)' \ + '$(BUILD_DIR)' + + $(MXE_NINJA) -C '$(BUILD_DIR)' -j '$(JOBS)' install +endef diff --git a/build/plugins/gtk4/gtk4.mk b/build/plugins/gtk4/gtk4.mk index c3d2114a..6e548d3c 100644 --- a/build/plugins/gtk4/gtk4.mk +++ b/build/plugins/gtk4/gtk4.mk @@ -2,13 +2,13 @@ PKG := gtk4 $(PKG)_WEBSITE := https://gtk.org/ $(PKG)_DESCR := GTK4 $(PKG)_IGNORE := -$(PKG)_VERSION := 4.18.6 -$(PKG)_CHECKSUM := e1817c650ddc3261f9a8345b3b22a26a5d80af154630dedc03cc7becefffd0fa +$(PKG)_VERSION := 4.19.2 +$(PKG)_CHECKSUM := b1d4d44ceb0402ad31b85a0382d8249962cdd3ae1bf9bc2e1a2c9ee3e1ad5b67 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/gtk-[0-9]*.patch))) $(PKG)_SUBDIR := gtk-$($(PKG)_VERSION) $(PKG)_FILE := gtk-$($(PKG)_VERSION).tar.xz $(PKG)_URL := https://download.gnome.org/sources/gtk/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) -$(PKG)_DEPS := cc meson-wrapper glib gdk-pixbuf pango fontconfig cairo libepoxy graphene +$(PKG)_DEPS := cc meson-wrapper glib gdk-pixbuf pango fontconfig cairo libepoxy graphene librsvg directx-headers define $(PKG)_BUILD # Disable tools diff --git a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch index ed5447ea..2547c8ba 100644 --- a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch +++ b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch @@ -14,111 +14,114 @@ from there. Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8494] +diff --git a/gsk/gpu/gskgpucachedfill.c b/gsk/gpu/gskgpucachedfill.c +index 1111111..2222222 100644 +--- a/gsk/gpu/gskgpucachedfill.c ++++ b/gsk/gpu/gskgpucachedfill.c +@@ -205,13 +205,14 @@ gsk_gpu_cached_fill_lookup (GskGpuCache *self, + return g_object_ref (cache->image); + } + +- if (!gsk_path_get_bounds (path, &viewport) || +- !gsk_rect_snap_to_grid (&viewport, ++ if (!gsk_path_get_bounds (path, &viewport)) ++ return NULL; ++ ++ gsk_rect_snap_to_grid_grow (&viewport, + scale, + &GRAPHENE_POINT_INIT ((float) fx / (sx * SUBPIXEL_SCALE_X), + (float) fy / (sy * SUBPIXEL_SCALE_Y)), +- &viewport)) +- return NULL; ++ &viewport); + + padding = 1; + /* Should already be integers because of snap_to_grid() above, but round just to be sure */ +diff --git a/gsk/gpu/gskgpucachedstroke.c b/gsk/gpu/gskgpucachedstroke.c +index 1111111..2222222 100644 +--- a/gsk/gpu/gskgpucachedstroke.c ++++ b/gsk/gpu/gskgpucachedstroke.c +@@ -218,13 +218,14 @@ gsk_gpu_cached_stroke_lookup (GskGpuCache *self, + return g_object_ref (cache->image); + } + +- if (!gsk_path_get_stroke_bounds (path, stroke, &viewport) || +- !gsk_rect_snap_to_grid (&viewport, ++ if (!gsk_path_get_stroke_bounds (path, stroke, &viewport)) ++ return NULL; ++ ++ gsk_rect_snap_to_grid_grow (&viewport, + scale, + &GRAPHENE_POINT_INIT ((float) fx / (sx * SUBPIXEL_SCALE_X), + (float) fy / (sy * SUBPIXEL_SCALE_Y)), +- &viewport)) +- return NULL; ++ &viewport); + + padding = 1; + /* Should already be integers because of snap_to_grid() above, but round just to be sure */ diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 1111111..2222222 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c -@@ -845,7 +845,8 @@ gsk_gpu_node_processor_get_node_as_image (GskGpuNodeProcessor *self, +@@ -582,8 +582,7 @@ gsk_gpu_node_processor_clip_node_bounds_and_snap_to_grid (GskGpuNodeProcessor *s + if (!gsk_rect_intersection (&tmp, &node->bounds, out_bounds)) + return FALSE; + +- if (!gsk_rect_snap_to_grid (out_bounds, &self->scale, &self->offset, out_bounds)) +- return FALSE; ++ gsk_rect_snap_to_grid_grow (out_bounds, &self->scale, &self->offset, out_bounds); + + return TRUE; + } +@@ -861,8 +860,8 @@ gsk_gpu_node_processor_get_node_as_image (GskGpuNodeProcessor *self, if (!gsk_rect_intersection (clip_bounds, &node->bounds, &clip)) return NULL; } -- gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &clip); +- if (!gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &clip)) +- return NULL; + + gsk_rect_snap_to_grid_grow (&clip, &self->scale, &self->offset, &clip); } return gsk_gpu_get_node_as_image (self->frame, -@@ -884,7 +885,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self, +@@ -901,8 +900,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self, if (!gsk_rect_intersection (rect, &clip_rect, &intermediate_rect)) return; -- gsk_rect_snap_to_grid (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect); +- if (!gsk_rect_snap_to_grid (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect)) +- return; + gsk_rect_snap_to_grid_grow (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect); intermediate = gsk_gpu_node_processor_init_draw (&other, self->frame, -@@ -959,7 +960,7 @@ gsk_gpu_node_processor_add_cairo_node (GskGpuNodeProcessor *self, - if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clipped_bounds)) - return; - -- gsk_rect_snap_to_grid (&clipped_bounds, &self->scale, &self->offset, &clipped_bounds); -+ gsk_rect_snap_to_grid_grow (&clipped_bounds, &self->scale, &self->offset, &clipped_bounds); - - if (graphene_rect_get_height (&clipped_bounds) <= 0.0 || graphene_rect_get_width (&clipped_bounds) <= 0.0) - return; -@@ -1297,7 +1298,7 @@ gsk_gpu_node_processor_add_rounded_clip_node_with_mask (GskGpuNodeProcessor *sel - - if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds)) - return; -- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); -+ gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); - - child_image = gsk_gpu_node_processor_get_node_as_image (self, - 0, -@@ -2148,7 +2149,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, - +@@ -2158,8 +2156,7 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip)) return; -- gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &rounded_clip); -+ + +- if (!gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &rounded_clip)) +- return; + gsk_rect_snap_to_grid_grow (&clip, &self->scale, &self->offset, &rounded_clip); image = gsk_gpu_get_texture_tiles_as_image (self->frame, self->ccs, -@@ -2306,7 +2308,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2327,15 +2324,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, gsk_gpu_node_processor_get_clip_bounds (self, &clip_bounds); /* first round to pixel boundaries, so we make sure the full pixels are covered */ -- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); +- if (!gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds)) +- { +- if (image) +- { +- gdk_color_state_unref (image_cs); +- g_object_unref (image); +- } +- return; +- } + gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); /* then expand by half a pixel so that pixels needed for eventual linear * filtering are available */ graphene_rect_inset (&clip_bounds, -0.5, -0.5); -@@ -2538,7 +2540,7 @@ gsk_gpu_node_processor_add_gradient_node (GskGpuNodeProcessor *self, - - if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &bounds)) - return; -- gsk_rect_snap_to_grid (&bounds, &self->scale, &self->offset, &bounds); -+ gsk_rect_snap_to_grid_grow (&bounds, &self->scale, &self->offset, &bounds); - - image = gsk_gpu_node_processor_init_draw (&other, - self->frame, -@@ -3005,7 +3007,7 @@ gsk_gpu_node_processor_add_mask_node (GskGpuNodeProcessor *self, - - if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &bounds)) - return; -- gsk_rect_snap_to_grid (&bounds, &self->scale, &self->offset, &bounds); -+ gsk_rect_snap_to_grid_grow (&bounds, &self->scale, &self->offset, &bounds); - - mask_image = gsk_gpu_node_processor_get_node_as_image (self, - 0, -@@ -3482,7 +3484,7 @@ gsk_gpu_node_processor_add_fill_node (GskGpuNodeProcessor *self, - - if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds)) - return; -- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); -+ gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); - - child = gsk_fill_node_get_child (node); - -@@ -3585,7 +3587,7 @@ gsk_gpu_node_processor_add_stroke_node (GskGpuNodeProcessor *self, - - if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds)) - return; -- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); -+ gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); - - child = gsk_stroke_node_get_child (node); - -@@ -4465,7 +4467,7 @@ gsk_gpu_node_processor_process (GskGpuFrame *frame, - if (!gsk_gpu_node_processor_clip_node_bounds (&self, node, &clip_bounds)) - continue; - -- gsk_rect_snap_to_grid (&clip_bounds, &self.scale, &self.offset, &clip_bounds); -+ gsk_rect_snap_to_grid_grow (&clip_bounds, &self.scale, &self.offset, &clip_bounds); - image = gsk_gpu_get_node_as_image (self.frame, - 0, - ccs, diff --git a/gsk/gskrectprivate.h b/gsk/gskrectprivate.h index 1111111..2222222 100644 --- a/gsk/gskrectprivate.h @@ -132,14 +135,19 @@ index 1111111..2222222 100644 * @src: rectangle to snap * @grid_scale: the scale of the grid * @grid_offset: the offset of the grid -@@ -180,10 +180,10 @@ gsk_rect_coverage (const graphene_rect_t *r1, +@@ -178,14 +178,12 @@ gsk_rect_coverage (const graphene_rect_t *r1, + * + * Note that floating point rounding issues might result * in the snapping not being perfectly exact. +- * +- * Returns false if the resulting rect has zero width/height **/ - static inline void +-static inline gboolean G_GNUC_WARN_UNUSED_RESULT -gsk_rect_snap_to_grid (const graphene_rect_t *src, - const graphene_vec2_t *grid_scale, - const graphene_point_t *grid_offset, - graphene_rect_t *dest) ++static inline void +gsk_rect_snap_to_grid_grow (const graphene_rect_t *src, + const graphene_vec2_t *grid_scale, + const graphene_point_t *grid_offset, @@ -147,10 +155,14 @@ index 1111111..2222222 100644 { float x, y, xscale, yscale; -@@ -199,6 +199,26 @@ gsk_rect_snap_to_grid (const graphene_rect_t *src, +@@ -199,11 +197,26 @@ gsk_rect_snap_to_grid (const graphene_rect_t *src, + y / yscale - grid_offset->y, + (ceilf ((src->origin.x + grid_offset->x + src->size.width) * xscale) - x) / xscale, (ceilf ((src->origin.y + grid_offset->y + src->size.height) * yscale) - y) / yscale); - } ++} +- if (dest->size.width <= 0.0 || dest->size.height <= 0.0) +- return FALSE; +static inline void +gsk_rect_snap_to_grid_shrink (const graphene_rect_t *src, + const graphene_vec2_t *grid_scale, @@ -158,7 +170,8 @@ index 1111111..2222222 100644 + graphene_rect_t *dest) +{ + float x, y, xscale, yscale; -+ + +- return TRUE; + xscale = graphene_vec2_get_x (grid_scale); + yscale = graphene_vec2_get_y (grid_scale); + @@ -169,11 +182,9 @@ index 1111111..2222222 100644 + y / yscale - grid_offset->y, + (floorf ((src->origin.x + grid_offset->x + src->size.width) * xscale) - x) / xscale, + (floorf ((src->origin.y + grid_offset->y + src->size.height) * yscale) - y) / yscale); -+} -+ + } + static inline gboolean G_GNUC_PURE - gsk_rect_is_empty (const graphene_rect_t *rect) - { From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte @@ -405,7 +416,7 @@ index 0000000..1111111 +GskSnapDirection +gsk_rect_snap_get_direction (GskRectSnap snap, + unsigned border) -+{ ++{ + return (GskSnapDirection) ((snap >> (8 * border)) & 0xFF); +} + @@ -454,7 +465,7 @@ index 0000000..1111111 + * + * Since: 4.18 + */ -+#define GSK_RECT_SNAP_INIT(top, right, bottom, left) (((((((left) << 8) | (bottom)) << 8) | (right)) << 8) | (top)) ++#define GSK_RECT_SNAP_INIT(top, right, bottom, left) (((((((left) << 8) | (bottom)) << 8) | (right)) << 8) | (top)) + +/** + * GSK_RECT_SNAP_NONE: @@ -536,7 +547,7 @@ index 1111111..2222222 100644 'gskrenderer.c', 'gskrendernode.c', 'gskrendernodeimpl.c', -@@ -81,6 +82,7 @@ gsk_public_headers = files([ +@@ -85,6 +86,7 @@ gsk_public_headers = files([ 'gskpathbuilder.h', 'gskpathmeasure.h', 'gskpathpoint.h', @@ -744,7 +755,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_rounded_clip, NULL); -@@ -1220,12 +1243,14 @@ gtk_snapshot_push_fill (GtkSnapshot *snapshot, +@@ -1221,12 +1244,14 @@ gtk_snapshot_push_fill (GtkSnapshot *snapshot, GskPath *path, GskFillRule fill_rule) { @@ -761,7 +772,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_fill, gtk_snapshot_clear_fill); -@@ -1323,12 +1348,14 @@ gtk_snapshot_push_stroke (GtkSnapshot *snapshot, +@@ -1326,12 +1351,14 @@ gtk_snapshot_push_stroke (GtkSnapshot *snapshot, GskPath *path, const GskStroke *stroke) { @@ -778,16 +789,16 @@ index 1111111..2222222 100644 gtk_snapshot_collect_stroke, gtk_snapshot_clear_stroke); -@@ -1450,7 +1477,7 @@ gtk_snapshot_push_shadow2 (GtkSnapshot *snapshot, - const GskShadow2 *shadow, - gsize n_shadows) +@@ -1453,7 +1480,7 @@ gtk_snapshot_push_shadows (GtkSnapshot *snapshot, + const GskShadowEntry *shadow, + gsize n_shadows) { - GtkSnapshotState *state; + GtkSnapshotState *state, *current_state; GskTransform *transform; float scale_x, scale_y, dx, dy; gsize i; -@@ -1461,8 +1488,10 @@ gtk_snapshot_push_shadow2 (GtkSnapshot *snapshot, +@@ -1464,8 +1491,10 @@ gtk_snapshot_push_shadows (GtkSnapshot *snapshot, &dx, &dy); transform = gsk_transform_scale (gsk_transform_translate (NULL, &GRAPHENE_POINT_INIT (dx, dy)), scale_x, scale_y); @@ -798,7 +809,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_shadow, gtk_snapshot_clear_shadow); -@@ -1568,12 +1597,14 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, +@@ -1571,12 +1600,14 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, top_state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -813,7 +824,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_blend_bottom, NULL); } -@@ -1648,6 +1679,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, +@@ -1651,6 +1682,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, source_state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -821,7 +832,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_mask_source, gtk_snapshot_clear_mask_source); -@@ -1655,6 +1687,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, +@@ -1658,6 +1690,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, gtk_snapshot_push_state (snapshot, source_state->transform, @@ -829,7 +840,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_mask_mask, NULL); } -@@ -1757,12 +1790,14 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot, +@@ -1760,12 +1793,14 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot, end_state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -844,7 +855,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_cross_fade_start, NULL); } -@@ -1873,11 +1908,9 @@ gtk_snapshot_pop_internal (GtkSnapshot *snapshot, +@@ -1876,11 +1911,9 @@ gtk_snapshot_pop_internal (GtkSnapshot *snapshot, return gtk_snapshot_pop_one (snapshot); } @@ -857,7 +868,7 @@ index 1111111..2222222 100644 * Pushes state so a later pop_collect call can collect all nodes * appended until that point. */ -@@ -1886,6 +1919,7 @@ gtk_snapshot_push_collect (GtkSnapshot *snapshot) +@@ -1889,6 +1922,7 @@ gtk_snapshot_push_collect (GtkSnapshot *snapshot) { gtk_snapshot_push_state (snapshot, NULL, @@ -865,7 +876,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_default, NULL); } -@@ -2047,10 +2081,15 @@ gtk_snapshot_gl_shader_pop_texture (GtkSnapshot *snapshot) +@@ -2050,10 +2084,15 @@ gtk_snapshot_gl_shader_pop_texture (GtkSnapshot *snapshot) void gtk_snapshot_save (GtkSnapshot *snapshot) { @@ -882,7 +893,7 @@ index 1111111..2222222 100644 NULL, NULL); } -@@ -2088,6 +2127,31 @@ gtk_snapshot_restore (GtkSnapshot *snapshot) +@@ -2091,6 +2130,31 @@ gtk_snapshot_restore (GtkSnapshot *snapshot) g_assert (node == NULL); } @@ -914,7 +925,7 @@ index 1111111..2222222 100644 /** * gtk_snapshot_transform: * @snapshot: a `GtkSnapshot` -@@ -2362,6 +2426,7 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, +@@ -2390,6 +2454,7 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, GdkTexture *texture, const graphene_rect_t *bounds) { @@ -922,7 +933,7 @@ index 1111111..2222222 100644 GskRenderNode *node; graphene_rect_t real_bounds; float scale_x, scale_y, dx, dy; -@@ -3355,6 +3420,7 @@ gtk_snapshot_push_subsurface (GtkSnapshot *snapshot, +@@ -3403,6 +3468,7 @@ gtk_snapshot_push_subsurface (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -983,7 +994,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -2701,6 +2701,7 @@ struct _GskTextureNode +@@ -2776,6 +2776,7 @@ struct _GskTextureNode GskRenderNode render_node; GdkTexture *texture; @@ -991,7 +1002,7 @@ index 1111111..2222222 100644 }; static void -@@ -2827,6 +2828,7 @@ gsk_texture_node_diff (GskRenderNode *node1, +@@ -2905,6 +2906,7 @@ gsk_texture_node_diff (GskRenderNode *node1, cairo_region_t *sub; if (!gsk_rect_equal (&node1->bounds, &node2->bounds) || @@ -999,7 +1010,7 @@ index 1111111..2222222 100644 gdk_texture_get_width (self1->texture) != gdk_texture_get_width (self2->texture) || gdk_texture_get_height (self1->texture) != gdk_texture_get_height (self2->texture)) { -@@ -2877,6 +2879,24 @@ gsk_texture_node_get_texture (const GskRenderNode *node) +@@ -2955,6 +2957,24 @@ gsk_texture_node_get_texture (const GskRenderNode *node) return self->texture; } @@ -1024,7 +1035,7 @@ index 1111111..2222222 100644 /** * gsk_texture_node_new: * @texture: the `GdkTexture` -@@ -2894,6 +2914,32 @@ gsk_texture_node_get_texture (const GskRenderNode *node) +@@ -2972,6 +2992,32 @@ gsk_texture_node_get_texture (const GskRenderNode *node) GskRenderNode * gsk_texture_node_new (GdkTexture *texture, const graphene_rect_t *bounds) @@ -1057,7 +1068,7 @@ index 1111111..2222222 100644 { GskTextureNode *self; GskRenderNode *node; -@@ -2908,6 +2954,7 @@ gsk_texture_node_new (GdkTexture *texture, +@@ -2986,6 +3032,7 @@ gsk_texture_node_new (GdkTexture *texture, node->is_hdr = color_state_is_hdr (gdk_texture_get_color_state (texture)); self->texture = g_object_ref (texture); @@ -1086,7 +1097,7 @@ index 1111111..2222222 100644 #include "gskroundedrectprivate.h" #include "gskrendernodeprivate.h" #include "gskstroke.h" -@@ -1106,6 +1107,51 @@ parse_mask_mode (GtkCssParser *parser, +@@ -1803,6 +1804,51 @@ parse_mask_mode (GtkCssParser *parser, return FALSE; } @@ -1138,7 +1149,7 @@ index 1111111..2222222 100644 static PangoFont * font_from_string (PangoFontMap *fontmap, const char *string, -@@ -2239,9 +2285,11 @@ parse_texture_node (GtkCssParser *parser, +@@ -2961,9 +3007,11 @@ parse_texture_node (GtkCssParser *parser, { graphene_rect_t bounds = GRAPHENE_RECT_INIT (0, 0, 50, 50); GdkTexture *texture = NULL; @@ -1151,7 +1162,7 @@ index 1111111..2222222 100644 }; GskRenderNode *node; -@@ -2250,7 +2298,7 @@ parse_texture_node (GtkCssParser *parser, +@@ -2972,7 +3020,7 @@ parse_texture_node (GtkCssParser *parser, if (texture == NULL) texture = create_default_texture (); @@ -1160,7 +1171,7 @@ index 1111111..2222222 100644 g_object_unref (texture); return node; -@@ -3857,6 +3905,58 @@ append_enum_param (Printer *p, +@@ -4532,6 +4580,58 @@ append_enum_param (Printer *p, g_string_append_c (p->str, '\n'); } @@ -1219,7 +1230,7 @@ index 1111111..2222222 100644 static void append_vec4_param (Printer *p, const char *param_name, -@@ -4726,6 +4826,7 @@ render_node_print (Printer *p, +@@ -5643,6 +5743,7 @@ render_node_print (Printer *p, append_rect_param (p, "bounds", &node->bounds); append_texture_param (p, "texture", gsk_texture_node_get_texture (node)); @@ -1241,7 +1252,7 @@ diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 1111111..2222222 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c -@@ -2137,6 +2137,7 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, +@@ -2143,6 +2143,7 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, GskGpuImage *image; GdkTexture *texture; gboolean should_mipmap; @@ -1249,7 +1260,7 @@ index 1111111..2222222 100644 texture = gsk_texture_node_get_texture (node); should_mipmap = texture_node_should_mipmap (node, self->frame, &self->scale); -@@ -2169,6 +2170,12 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, +@@ -2175,6 +2176,12 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, return; } @@ -1261,8 +1272,8 @@ index 1111111..2222222 100644 + if (should_mipmap) { - if ((gsk_gpu_image_get_flags (image) & (GSK_GPU_IMAGE_STRAIGHT_ALPHA | GSK_GPU_IMAGE_CAN_MIPMAP)) != GSK_GPU_IMAGE_CAN_MIPMAP || -@@ -2189,8 +2196,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, + if ((gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_CAN_MIPMAP) != GSK_GPU_IMAGE_CAN_MIPMAP || +@@ -2197,8 +2204,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, image, image_cs, GSK_GPU_SAMPLER_MIPMAP_DEFAULT, @@ -1273,7 +1284,7 @@ index 1111111..2222222 100644 } else { -@@ -2198,8 +2205,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, +@@ -2206,8 +2213,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, image, image_cs, GSK_GPU_SAMPLER_DEFAULT, @@ -1283,8 +1294,8 @@ index 1111111..2222222 100644 + &bounds); } - g_object_unref (image); -@@ -2242,6 +2249,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, + gdk_color_state_unref (image_cs); +@@ -2251,6 +2258,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, GdkColorState *image_cs; GskGpuImage *image; gboolean should_mipmap; @@ -1292,7 +1303,7 @@ index 1111111..2222222 100644 if ((flags & GSK_GPU_AS_IMAGE_EXACT_SIZE) && !gsk_rect_equal (clip_bounds, &node->bounds)) -@@ -2249,6 +2257,11 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, +@@ -2258,6 +2266,11 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, should_mipmap = texture_node_should_mipmap (node, frame, scale); image = gsk_gpu_lookup_texture (frame, ccs, texture, FALSE, &image_cs); @@ -1304,7 +1315,7 @@ index 1111111..2222222 100644 if (image == NULL) { -@@ -2256,7 +2269,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, +@@ -2265,7 +2278,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, ccs, clip_bounds, scale, @@ -1313,10 +1324,10 @@ index 1111111..2222222 100644 gsk_texture_node_get_texture (node), should_mipmap ? GSK_SCALING_FILTER_TRILINEAR : GSK_SCALING_FILTER_LINEAR); *out_bounds = *clip_bounds; -@@ -2278,7 +2291,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, - ccs); +@@ -2294,7 +2307,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, } + gdk_color_state_unref (image_cs); - *out_bounds = node->bounds; + *out_bounds = bounds; return image; @@ -1338,7 +1349,7 @@ diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 1111111..2222222 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c -@@ -1027,6 +1027,23 @@ add_texture_rows (GListStore *store, +@@ -1109,6 +1109,23 @@ add_texture_rows (GListStore *store, } } @@ -1362,7 +1373,7 @@ index 1111111..2222222 100644 static void populate_render_node_properties (GListStore *store, GskRenderNode *node, -@@ -1096,6 +1113,7 @@ populate_render_node_properties (GListStore *store, +@@ -1178,6 +1195,7 @@ populate_render_node_properties (GListStore *store, GdkTexture *texture = gsk_texture_node_get_texture (node); add_texture_rows (store, texture); @@ -1383,7 +1394,7 @@ diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 1111111..2222222 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c -@@ -2437,7 +2437,8 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, +@@ -2465,7 +2465,8 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, gtk_snapshot_ensure_affine (snapshot, &scale_x, &scale_y, &dx, &dy); gtk_graphene_rect_scale_affine (bounds, scale_x, scale_y, dx, dy, &real_bounds); @@ -1428,7 +1439,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -2979,6 +2979,8 @@ struct _GskTextureScaleNode +@@ -3057,6 +3057,8 @@ struct _GskTextureScaleNode GdkTexture *texture; GskScalingFilter filter; @@ -1437,7 +1448,7 @@ index 1111111..2222222 100644 }; static void -@@ -3065,6 +3067,7 @@ gsk_texture_scale_node_diff (GskRenderNode *node1, +@@ -3143,6 +3145,7 @@ gsk_texture_scale_node_diff (GskRenderNode *node1, if (!gsk_rect_equal (&node1->bounds, &node2->bounds) || self1->filter != self2->filter || @@ -1445,7 +1456,7 @@ index 1111111..2222222 100644 gdk_texture_get_width (self1->texture) != gdk_texture_get_width (self2->texture) || gdk_texture_get_height (self1->texture) != gdk_texture_get_height (self2->texture)) { -@@ -3135,6 +3138,24 @@ gsk_texture_scale_node_get_filter (const GskRenderNode *node) +@@ -3213,6 +3216,24 @@ gsk_texture_scale_node_get_filter (const GskRenderNode *node) return self->filter; } @@ -1470,7 +1481,7 @@ index 1111111..2222222 100644 /** * gsk_texture_scale_node_new: * @texture: the texture to scale -@@ -3162,6 +3183,43 @@ GskRenderNode * +@@ -3240,6 +3261,43 @@ GskRenderNode * gsk_texture_scale_node_new (GdkTexture *texture, const graphene_rect_t *bounds, GskScalingFilter filter) @@ -1514,7 +1525,7 @@ index 1111111..2222222 100644 { GskTextureScaleNode *self; GskRenderNode *node; -@@ -3181,6 +3239,7 @@ gsk_texture_scale_node_new (GdkTexture *texture, +@@ -3259,6 +3317,7 @@ gsk_texture_scale_node_new (GdkTexture *texture, gsk_rect_init_from_rect (&node->bounds, bounds); gsk_rect_normalize (&node->bounds); self->filter = filter; @@ -1535,7 +1546,7 @@ diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c -@@ -2311,10 +2311,12 @@ parse_texture_scale_node (GtkCssParser *parser, +@@ -3033,10 +3033,12 @@ parse_texture_scale_node (GtkCssParser *parser, graphene_rect_t bounds = GRAPHENE_RECT_INIT (0, 0, 50, 50); GdkTexture *texture = NULL; GskScalingFilter filter = GSK_SCALING_FILTER_LINEAR; @@ -1549,7 +1560,7 @@ index 1111111..2222222 100644 }; GskRenderNode *node; -@@ -2323,7 +2325,7 @@ parse_texture_scale_node (GtkCssParser *parser, +@@ -3045,7 +3047,7 @@ parse_texture_scale_node (GtkCssParser *parser, if (texture == NULL) texture = create_default_texture (); @@ -1558,7 +1569,7 @@ index 1111111..2222222 100644 g_object_unref (texture); return node; -@@ -4853,6 +4855,8 @@ render_node_print (Printer *p, +@@ -5770,6 +5772,8 @@ render_node_print (Printer *p, } append_texture_param (p, "texture", gsk_texture_scale_node_get_texture (node)); @@ -1581,7 +1592,7 @@ diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 1111111..2222222 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c -@@ -2304,6 +2304,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2320,6 +2320,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, GdkColorState *image_cs; GskScalingFilter scaling_filter; gboolean need_mipmap, need_offscreen; @@ -1589,7 +1600,7 @@ index 1111111..2222222 100644 texture = gsk_texture_scale_node_get_texture (node); scaling_filter = gsk_texture_scale_node_get_filter (node); -@@ -2367,6 +2368,12 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2388,6 +2389,12 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, return; } @@ -1599,10 +1610,10 @@ index 1111111..2222222 100644 + &self->offset, + &bounds); + - if ((gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_STRAIGHT_ALPHA) || + if (gsk_gpu_image_get_shader_op (image) != GDK_SHADER_DEFAULT || (need_mipmap && !(gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_CAN_MIPMAP)) || !gdk_color_state_equal (image_cs, self->ccs)) -@@ -2383,13 +2390,13 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2405,13 +2412,13 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, gsk_gpu_mipmap_op (self->frame, image); gsk_gpu_texture_op (self->frame, @@ -1618,7 +1629,7 @@ index 1111111..2222222 100644 + &bounds, }); - g_object_unref (image); + gdk_color_state_unref (image_cs); From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen @@ -1633,7 +1644,7 @@ diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 1111111..2222222 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c -@@ -1127,6 +1127,7 @@ populate_render_node_properties (GListStore *store, +@@ -1209,6 +1209,7 @@ populate_render_node_properties (GListStore *store, tmp = g_enum_to_string (GSK_TYPE_SCALING_FILTER, filter); add_text_row (store, "Filter", "%s", tmp); @@ -1655,7 +1666,7 @@ diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 1111111..2222222 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c -@@ -2466,6 +2466,7 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, +@@ -2494,6 +2494,7 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, GskScalingFilter filter, const graphene_rect_t *bounds) { @@ -1663,7 +1674,7 @@ index 1111111..2222222 100644 GskRenderNode *node; g_return_if_fail (snapshot != NULL); -@@ -2473,7 +2474,11 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, +@@ -2501,7 +2502,11 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, g_return_if_fail (bounds != NULL); gtk_snapshot_ensure_identity (snapshot); @@ -1688,7 +1699,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -2789,6 +2789,7 @@ gsk_texture_node_draw (GskRenderNode *node, +@@ -2867,6 +2867,7 @@ gsk_texture_node_draw (GskRenderNode *node, cairo_pattern_t *pattern; cairo_matrix_t matrix; int width, height; @@ -1696,7 +1707,7 @@ index 1111111..2222222 100644 width = gdk_texture_get_width (self->texture); height = gdk_texture_get_height (self->texture); -@@ -2802,19 +2803,21 @@ gsk_texture_node_draw (GskRenderNode *node, +@@ -2880,19 +2881,21 @@ gsk_texture_node_draw (GskRenderNode *node, pattern = cairo_pattern_create_for_surface (surface); cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); @@ -1735,7 +1746,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -3014,9 +3014,14 @@ gsk_texture_scale_node_draw (GskRenderNode *node, +@@ -3092,9 +3092,14 @@ gsk_texture_scale_node_draw (GskRenderNode *node, cairo_t *cr2; cairo_surface_t *surface2; graphene_rect_t clip_rect; @@ -1751,7 +1762,7 @@ index 1111111..2222222 100644 cairo_clip (cr); _graphene_rect_init_from_clip_extents (&clip_rect, cr); if (clip_rect.size.width <= 0 || clip_rect.size.height <= 0) -@@ -3033,9 +3038,9 @@ gsk_texture_scale_node_draw (GskRenderNode *node, +@@ -3111,9 +3116,9 @@ gsk_texture_scale_node_draw (GskRenderNode *node, cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); cairo_matrix_init_scale (&matrix, @@ -1764,7 +1775,7 @@ index 1111111..2222222 100644 cairo_pattern_set_matrix (pattern, &matrix); cairo_pattern_set_filter (pattern, filters[self->filter]); -@@ -3043,7 +3048,7 @@ gsk_texture_scale_node_draw (GskRenderNode *node, +@@ -3121,7 +3126,7 @@ gsk_texture_scale_node_draw (GskRenderNode *node, cairo_pattern_destroy (pattern); cairo_surface_destroy (surface); diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index f1f58436..8965b38d 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -10,6 +10,7 @@ $(PKG)_DEPS := cc meson-wrapper gtk4 vips-all define $(PKG)_PRE_CONFIGURE (printf '{\n'; \ + printf ' "directx-headers": "$(directx-headers_VERSION)",\n'; \ printf ' "epoxy": "$(libepoxy_VERSION)",\n'; \ printf ' "graphene": "$(graphene_VERSION)",\n'; \ printf ' "gtk": "$(gtk4_VERSION)",\n'; \ diff --git a/packaging/package-gtk.sh b/packaging/package-gtk.sh index 61030792..cbf721a5 100755 --- a/packaging/package-gtk.sh +++ b/packaging/package-gtk.sh @@ -92,8 +92,8 @@ fi echo "Copying $package and dependencies" -# Whitelist dwrite.dll, hid.dll and opengl32.dll for GTK -whitelist+=(dwrite.dll hid.dll opengl32.dll) +# A few more DLLs are required to be whitelisted for GTK +whitelist+=(d3d1{1,2}.dll dcomp.dll dwrite.dll dxgi.dll hid.dll opengl32.dll shcore.dll) # Copy libvips and dependencies with pe-util for pe_target in "${pe_targets[@]}"; do From 41b1e78318dd32beb3bf9c5c1b6d329ebb9a4f37 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 29 Jul 2025 12:38:23 +0200 Subject: [PATCH 12/16] Revert "Update GTK to 4.19.2" This reverts commit f35126cfdba4a8c94d038ee114b6064c72a3c50e due to https://gitlab.gnome.org/GNOME/gtk/-/issues/7567. --- build/nip4.mk | 1 - build/plugins/gtk4/directx-headers.mk | 18 -- build/plugins/gtk4/gtk4.mk | 6 +- .../plugins/gtk4/patches/gtk-4-mr-8494.patch | 303 +++++++++--------- build/vipsdisp.mk | 1 - packaging/package-gtk.sh | 4 +- 6 files changed, 151 insertions(+), 182 deletions(-) delete mode 100644 build/plugins/gtk4/directx-headers.mk diff --git a/build/nip4.mk b/build/nip4.mk index 53d9e4d5..9c755956 100644 --- a/build/nip4.mk +++ b/build/nip4.mk @@ -10,7 +10,6 @@ $(PKG)_DEPS := cc meson-wrapper gtk4 gsl vips-all define $(PKG)_PRE_CONFIGURE (printf '{\n'; \ - printf ' "directx-headers": "$(directx-headers_VERSION)",\n'; \ printf ' "epoxy": "$(libepoxy_VERSION)",\n'; \ printf ' "graphene": "$(graphene_VERSION)",\n'; \ printf ' "gsl": "$(gsl_VERSION)",\n'; \ diff --git a/build/plugins/gtk4/directx-headers.mk b/build/plugins/gtk4/directx-headers.mk deleted file mode 100644 index 1856b8f9..00000000 --- a/build/plugins/gtk4/directx-headers.mk +++ /dev/null @@ -1,18 +0,0 @@ -PKG := directx-headers -$(PKG)_WEBSITE := https://github.com/microsoft/DirectX-Headers -$(PKG)_DESCR := Official DirectX headers available under an open source license -$(PKG)_IGNORE := -$(PKG)_VERSION := 1.616.0 -$(PKG)_CHECKSUM := 125f492802939b40223bfccb83badd3f599af2d3449613d6cb893720607b9025 -$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) -$(PKG)_GH_CONF := microsoft/DirectX-Headers/tags,v -$(PKG)_DEPS := cc meson-wrapper - -define $(PKG)_BUILD - $(MXE_MESON_WRAPPER) \ - -Dbuild-test=false \ - '$(SOURCE_DIR)' \ - '$(BUILD_DIR)' - - $(MXE_NINJA) -C '$(BUILD_DIR)' -j '$(JOBS)' install -endef diff --git a/build/plugins/gtk4/gtk4.mk b/build/plugins/gtk4/gtk4.mk index 6e548d3c..c3d2114a 100644 --- a/build/plugins/gtk4/gtk4.mk +++ b/build/plugins/gtk4/gtk4.mk @@ -2,13 +2,13 @@ PKG := gtk4 $(PKG)_WEBSITE := https://gtk.org/ $(PKG)_DESCR := GTK4 $(PKG)_IGNORE := -$(PKG)_VERSION := 4.19.2 -$(PKG)_CHECKSUM := b1d4d44ceb0402ad31b85a0382d8249962cdd3ae1bf9bc2e1a2c9ee3e1ad5b67 +$(PKG)_VERSION := 4.18.6 +$(PKG)_CHECKSUM := e1817c650ddc3261f9a8345b3b22a26a5d80af154630dedc03cc7becefffd0fa $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/gtk-[0-9]*.patch))) $(PKG)_SUBDIR := gtk-$($(PKG)_VERSION) $(PKG)_FILE := gtk-$($(PKG)_VERSION).tar.xz $(PKG)_URL := https://download.gnome.org/sources/gtk/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) -$(PKG)_DEPS := cc meson-wrapper glib gdk-pixbuf pango fontconfig cairo libepoxy graphene librsvg directx-headers +$(PKG)_DEPS := cc meson-wrapper glib gdk-pixbuf pango fontconfig cairo libepoxy graphene define $(PKG)_BUILD # Disable tools diff --git a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch index 2547c8ba..ed5447ea 100644 --- a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch +++ b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch @@ -14,114 +14,111 @@ from there. Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8494] -diff --git a/gsk/gpu/gskgpucachedfill.c b/gsk/gpu/gskgpucachedfill.c -index 1111111..2222222 100644 ---- a/gsk/gpu/gskgpucachedfill.c -+++ b/gsk/gpu/gskgpucachedfill.c -@@ -205,13 +205,14 @@ gsk_gpu_cached_fill_lookup (GskGpuCache *self, - return g_object_ref (cache->image); - } - -- if (!gsk_path_get_bounds (path, &viewport) || -- !gsk_rect_snap_to_grid (&viewport, -+ if (!gsk_path_get_bounds (path, &viewport)) -+ return NULL; -+ -+ gsk_rect_snap_to_grid_grow (&viewport, - scale, - &GRAPHENE_POINT_INIT ((float) fx / (sx * SUBPIXEL_SCALE_X), - (float) fy / (sy * SUBPIXEL_SCALE_Y)), -- &viewport)) -- return NULL; -+ &viewport); - - padding = 1; - /* Should already be integers because of snap_to_grid() above, but round just to be sure */ -diff --git a/gsk/gpu/gskgpucachedstroke.c b/gsk/gpu/gskgpucachedstroke.c -index 1111111..2222222 100644 ---- a/gsk/gpu/gskgpucachedstroke.c -+++ b/gsk/gpu/gskgpucachedstroke.c -@@ -218,13 +218,14 @@ gsk_gpu_cached_stroke_lookup (GskGpuCache *self, - return g_object_ref (cache->image); - } - -- if (!gsk_path_get_stroke_bounds (path, stroke, &viewport) || -- !gsk_rect_snap_to_grid (&viewport, -+ if (!gsk_path_get_stroke_bounds (path, stroke, &viewport)) -+ return NULL; -+ -+ gsk_rect_snap_to_grid_grow (&viewport, - scale, - &GRAPHENE_POINT_INIT ((float) fx / (sx * SUBPIXEL_SCALE_X), - (float) fy / (sy * SUBPIXEL_SCALE_Y)), -- &viewport)) -- return NULL; -+ &viewport); - - padding = 1; - /* Should already be integers because of snap_to_grid() above, but round just to be sure */ diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 1111111..2222222 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c -@@ -582,8 +582,7 @@ gsk_gpu_node_processor_clip_node_bounds_and_snap_to_grid (GskGpuNodeProcessor *s - if (!gsk_rect_intersection (&tmp, &node->bounds, out_bounds)) - return FALSE; - -- if (!gsk_rect_snap_to_grid (out_bounds, &self->scale, &self->offset, out_bounds)) -- return FALSE; -+ gsk_rect_snap_to_grid_grow (out_bounds, &self->scale, &self->offset, out_bounds); - - return TRUE; - } -@@ -861,8 +860,8 @@ gsk_gpu_node_processor_get_node_as_image (GskGpuNodeProcessor *self, +@@ -845,7 +845,8 @@ gsk_gpu_node_processor_get_node_as_image (GskGpuNodeProcessor *self, if (!gsk_rect_intersection (clip_bounds, &node->bounds, &clip)) return NULL; } -- if (!gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &clip)) -- return NULL; +- gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &clip); + + gsk_rect_snap_to_grid_grow (&clip, &self->scale, &self->offset, &clip); } return gsk_gpu_get_node_as_image (self->frame, -@@ -901,8 +900,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self, +@@ -884,7 +885,7 @@ gsk_gpu_node_processor_blur_op (GskGpuNodeProcessor *self, if (!gsk_rect_intersection (rect, &clip_rect, &intermediate_rect)) return; -- if (!gsk_rect_snap_to_grid (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect)) -- return; +- gsk_rect_snap_to_grid (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect); + gsk_rect_snap_to_grid_grow (&intermediate_rect, &self->scale, &self->offset, &intermediate_rect); intermediate = gsk_gpu_node_processor_init_draw (&other, self->frame, -@@ -2158,8 +2156,7 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, +@@ -959,7 +960,7 @@ gsk_gpu_node_processor_add_cairo_node (GskGpuNodeProcessor *self, + if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clipped_bounds)) + return; + +- gsk_rect_snap_to_grid (&clipped_bounds, &self->scale, &self->offset, &clipped_bounds); ++ gsk_rect_snap_to_grid_grow (&clipped_bounds, &self->scale, &self->offset, &clipped_bounds); + + if (graphene_rect_get_height (&clipped_bounds) <= 0.0 || graphene_rect_get_width (&clipped_bounds) <= 0.0) + return; +@@ -1297,7 +1298,7 @@ gsk_gpu_node_processor_add_rounded_clip_node_with_mask (GskGpuNodeProcessor *sel + + if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds)) + return; +- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); ++ gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); + + child_image = gsk_gpu_node_processor_get_node_as_image (self, + 0, +@@ -2148,7 +2149,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, + if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip)) return; - -- if (!gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &rounded_clip)) -- return; +- gsk_rect_snap_to_grid (&clip, &self->scale, &self->offset, &rounded_clip); ++ + gsk_rect_snap_to_grid_grow (&clip, &self->scale, &self->offset, &rounded_clip); image = gsk_gpu_get_texture_tiles_as_image (self->frame, self->ccs, -@@ -2327,15 +2324,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2306,7 +2308,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, gsk_gpu_node_processor_get_clip_bounds (self, &clip_bounds); /* first round to pixel boundaries, so we make sure the full pixels are covered */ -- if (!gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds)) -- { -- if (image) -- { -- gdk_color_state_unref (image_cs); -- g_object_unref (image); -- } -- return; -- } +- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); + gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); /* then expand by half a pixel so that pixels needed for eventual linear * filtering are available */ graphene_rect_inset (&clip_bounds, -0.5, -0.5); +@@ -2538,7 +2540,7 @@ gsk_gpu_node_processor_add_gradient_node (GskGpuNodeProcessor *self, + + if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &bounds)) + return; +- gsk_rect_snap_to_grid (&bounds, &self->scale, &self->offset, &bounds); ++ gsk_rect_snap_to_grid_grow (&bounds, &self->scale, &self->offset, &bounds); + + image = gsk_gpu_node_processor_init_draw (&other, + self->frame, +@@ -3005,7 +3007,7 @@ gsk_gpu_node_processor_add_mask_node (GskGpuNodeProcessor *self, + + if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &bounds)) + return; +- gsk_rect_snap_to_grid (&bounds, &self->scale, &self->offset, &bounds); ++ gsk_rect_snap_to_grid_grow (&bounds, &self->scale, &self->offset, &bounds); + + mask_image = gsk_gpu_node_processor_get_node_as_image (self, + 0, +@@ -3482,7 +3484,7 @@ gsk_gpu_node_processor_add_fill_node (GskGpuNodeProcessor *self, + + if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds)) + return; +- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); ++ gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); + + child = gsk_fill_node_get_child (node); + +@@ -3585,7 +3587,7 @@ gsk_gpu_node_processor_add_stroke_node (GskGpuNodeProcessor *self, + + if (!gsk_gpu_node_processor_clip_node_bounds (self, node, &clip_bounds)) + return; +- gsk_rect_snap_to_grid (&clip_bounds, &self->scale, &self->offset, &clip_bounds); ++ gsk_rect_snap_to_grid_grow (&clip_bounds, &self->scale, &self->offset, &clip_bounds); + + child = gsk_stroke_node_get_child (node); + +@@ -4465,7 +4467,7 @@ gsk_gpu_node_processor_process (GskGpuFrame *frame, + if (!gsk_gpu_node_processor_clip_node_bounds (&self, node, &clip_bounds)) + continue; + +- gsk_rect_snap_to_grid (&clip_bounds, &self.scale, &self.offset, &clip_bounds); ++ gsk_rect_snap_to_grid_grow (&clip_bounds, &self.scale, &self.offset, &clip_bounds); + image = gsk_gpu_get_node_as_image (self.frame, + 0, + ccs, diff --git a/gsk/gskrectprivate.h b/gsk/gskrectprivate.h index 1111111..2222222 100644 --- a/gsk/gskrectprivate.h @@ -135,19 +132,14 @@ index 1111111..2222222 100644 * @src: rectangle to snap * @grid_scale: the scale of the grid * @grid_offset: the offset of the grid -@@ -178,14 +178,12 @@ gsk_rect_coverage (const graphene_rect_t *r1, - * - * Note that floating point rounding issues might result +@@ -180,10 +180,10 @@ gsk_rect_coverage (const graphene_rect_t *r1, * in the snapping not being perfectly exact. -- * -- * Returns false if the resulting rect has zero width/height **/ --static inline gboolean G_GNUC_WARN_UNUSED_RESULT + static inline void -gsk_rect_snap_to_grid (const graphene_rect_t *src, - const graphene_vec2_t *grid_scale, - const graphene_point_t *grid_offset, - graphene_rect_t *dest) -+static inline void +gsk_rect_snap_to_grid_grow (const graphene_rect_t *src, + const graphene_vec2_t *grid_scale, + const graphene_point_t *grid_offset, @@ -155,14 +147,10 @@ index 1111111..2222222 100644 { float x, y, xscale, yscale; -@@ -199,11 +197,26 @@ gsk_rect_snap_to_grid (const graphene_rect_t *src, - y / yscale - grid_offset->y, - (ceilf ((src->origin.x + grid_offset->x + src->size.width) * xscale) - x) / xscale, +@@ -199,6 +199,26 @@ gsk_rect_snap_to_grid (const graphene_rect_t *src, (ceilf ((src->origin.y + grid_offset->y + src->size.height) * yscale) - y) / yscale); -+} + } -- if (dest->size.width <= 0.0 || dest->size.height <= 0.0) -- return FALSE; +static inline void +gsk_rect_snap_to_grid_shrink (const graphene_rect_t *src, + const graphene_vec2_t *grid_scale, @@ -170,8 +158,7 @@ index 1111111..2222222 100644 + graphene_rect_t *dest) +{ + float x, y, xscale, yscale; - -- return TRUE; ++ + xscale = graphene_vec2_get_x (grid_scale); + yscale = graphene_vec2_get_y (grid_scale); + @@ -182,9 +169,11 @@ index 1111111..2222222 100644 + y / yscale - grid_offset->y, + (floorf ((src->origin.x + grid_offset->x + src->size.width) * xscale) - x) / xscale, + (floorf ((src->origin.y + grid_offset->y + src->size.height) * yscale) - y) / yscale); - } - ++} ++ static inline gboolean G_GNUC_PURE + gsk_rect_is_empty (const graphene_rect_t *rect) + { From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Benjamin Otte @@ -416,7 +405,7 @@ index 0000000..1111111 +GskSnapDirection +gsk_rect_snap_get_direction (GskRectSnap snap, + unsigned border) -+{ ++{ + return (GskSnapDirection) ((snap >> (8 * border)) & 0xFF); +} + @@ -465,7 +454,7 @@ index 0000000..1111111 + * + * Since: 4.18 + */ -+#define GSK_RECT_SNAP_INIT(top, right, bottom, left) (((((((left) << 8) | (bottom)) << 8) | (right)) << 8) | (top)) ++#define GSK_RECT_SNAP_INIT(top, right, bottom, left) (((((((left) << 8) | (bottom)) << 8) | (right)) << 8) | (top)) + +/** + * GSK_RECT_SNAP_NONE: @@ -547,7 +536,7 @@ index 1111111..2222222 100644 'gskrenderer.c', 'gskrendernode.c', 'gskrendernodeimpl.c', -@@ -85,6 +86,7 @@ gsk_public_headers = files([ +@@ -81,6 +82,7 @@ gsk_public_headers = files([ 'gskpathbuilder.h', 'gskpathmeasure.h', 'gskpathpoint.h', @@ -755,7 +744,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_rounded_clip, NULL); -@@ -1221,12 +1244,14 @@ gtk_snapshot_push_fill (GtkSnapshot *snapshot, +@@ -1220,12 +1243,14 @@ gtk_snapshot_push_fill (GtkSnapshot *snapshot, GskPath *path, GskFillRule fill_rule) { @@ -772,7 +761,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_fill, gtk_snapshot_clear_fill); -@@ -1326,12 +1351,14 @@ gtk_snapshot_push_stroke (GtkSnapshot *snapshot, +@@ -1323,12 +1348,14 @@ gtk_snapshot_push_stroke (GtkSnapshot *snapshot, GskPath *path, const GskStroke *stroke) { @@ -789,16 +778,16 @@ index 1111111..2222222 100644 gtk_snapshot_collect_stroke, gtk_snapshot_clear_stroke); -@@ -1453,7 +1480,7 @@ gtk_snapshot_push_shadows (GtkSnapshot *snapshot, - const GskShadowEntry *shadow, - gsize n_shadows) +@@ -1450,7 +1477,7 @@ gtk_snapshot_push_shadow2 (GtkSnapshot *snapshot, + const GskShadow2 *shadow, + gsize n_shadows) { - GtkSnapshotState *state; + GtkSnapshotState *state, *current_state; GskTransform *transform; float scale_x, scale_y, dx, dy; gsize i; -@@ -1464,8 +1491,10 @@ gtk_snapshot_push_shadows (GtkSnapshot *snapshot, +@@ -1461,8 +1488,10 @@ gtk_snapshot_push_shadow2 (GtkSnapshot *snapshot, &dx, &dy); transform = gsk_transform_scale (gsk_transform_translate (NULL, &GRAPHENE_POINT_INIT (dx, dy)), scale_x, scale_y); @@ -809,7 +798,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_shadow, gtk_snapshot_clear_shadow); -@@ -1571,12 +1600,14 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, +@@ -1568,12 +1597,14 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot, top_state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -824,7 +813,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_blend_bottom, NULL); } -@@ -1651,6 +1682,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, +@@ -1648,6 +1679,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, source_state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -832,7 +821,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_mask_source, gtk_snapshot_clear_mask_source); -@@ -1658,6 +1690,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, +@@ -1655,6 +1687,7 @@ gtk_snapshot_push_mask (GtkSnapshot *snapshot, gtk_snapshot_push_state (snapshot, source_state->transform, @@ -840,7 +829,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_mask_mask, NULL); } -@@ -1760,12 +1793,14 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot, +@@ -1757,12 +1790,14 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot, end_state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -855,7 +844,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_cross_fade_start, NULL); } -@@ -1876,11 +1911,9 @@ gtk_snapshot_pop_internal (GtkSnapshot *snapshot, +@@ -1873,11 +1908,9 @@ gtk_snapshot_pop_internal (GtkSnapshot *snapshot, return gtk_snapshot_pop_one (snapshot); } @@ -868,7 +857,7 @@ index 1111111..2222222 100644 * Pushes state so a later pop_collect call can collect all nodes * appended until that point. */ -@@ -1889,6 +1922,7 @@ gtk_snapshot_push_collect (GtkSnapshot *snapshot) +@@ -1886,6 +1919,7 @@ gtk_snapshot_push_collect (GtkSnapshot *snapshot) { gtk_snapshot_push_state (snapshot, NULL, @@ -876,7 +865,7 @@ index 1111111..2222222 100644 gtk_snapshot_collect_default, NULL); } -@@ -2050,10 +2084,15 @@ gtk_snapshot_gl_shader_pop_texture (GtkSnapshot *snapshot) +@@ -2047,10 +2081,15 @@ gtk_snapshot_gl_shader_pop_texture (GtkSnapshot *snapshot) void gtk_snapshot_save (GtkSnapshot *snapshot) { @@ -893,7 +882,7 @@ index 1111111..2222222 100644 NULL, NULL); } -@@ -2091,6 +2130,31 @@ gtk_snapshot_restore (GtkSnapshot *snapshot) +@@ -2088,6 +2127,31 @@ gtk_snapshot_restore (GtkSnapshot *snapshot) g_assert (node == NULL); } @@ -925,7 +914,7 @@ index 1111111..2222222 100644 /** * gtk_snapshot_transform: * @snapshot: a `GtkSnapshot` -@@ -2390,6 +2454,7 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, +@@ -2362,6 +2426,7 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, GdkTexture *texture, const graphene_rect_t *bounds) { @@ -933,7 +922,7 @@ index 1111111..2222222 100644 GskRenderNode *node; graphene_rect_t real_bounds; float scale_x, scale_y, dx, dy; -@@ -3403,6 +3468,7 @@ gtk_snapshot_push_subsurface (GtkSnapshot *snapshot, +@@ -3355,6 +3420,7 @@ gtk_snapshot_push_subsurface (GtkSnapshot *snapshot, state = gtk_snapshot_push_state (snapshot, current_state->transform, @@ -994,7 +983,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -2776,6 +2776,7 @@ struct _GskTextureNode +@@ -2701,6 +2701,7 @@ struct _GskTextureNode GskRenderNode render_node; GdkTexture *texture; @@ -1002,7 +991,7 @@ index 1111111..2222222 100644 }; static void -@@ -2905,6 +2906,7 @@ gsk_texture_node_diff (GskRenderNode *node1, +@@ -2827,6 +2828,7 @@ gsk_texture_node_diff (GskRenderNode *node1, cairo_region_t *sub; if (!gsk_rect_equal (&node1->bounds, &node2->bounds) || @@ -1010,7 +999,7 @@ index 1111111..2222222 100644 gdk_texture_get_width (self1->texture) != gdk_texture_get_width (self2->texture) || gdk_texture_get_height (self1->texture) != gdk_texture_get_height (self2->texture)) { -@@ -2955,6 +2957,24 @@ gsk_texture_node_get_texture (const GskRenderNode *node) +@@ -2877,6 +2879,24 @@ gsk_texture_node_get_texture (const GskRenderNode *node) return self->texture; } @@ -1035,7 +1024,7 @@ index 1111111..2222222 100644 /** * gsk_texture_node_new: * @texture: the `GdkTexture` -@@ -2972,6 +2992,32 @@ gsk_texture_node_get_texture (const GskRenderNode *node) +@@ -2894,6 +2914,32 @@ gsk_texture_node_get_texture (const GskRenderNode *node) GskRenderNode * gsk_texture_node_new (GdkTexture *texture, const graphene_rect_t *bounds) @@ -1068,7 +1057,7 @@ index 1111111..2222222 100644 { GskTextureNode *self; GskRenderNode *node; -@@ -2986,6 +3032,7 @@ gsk_texture_node_new (GdkTexture *texture, +@@ -2908,6 +2954,7 @@ gsk_texture_node_new (GdkTexture *texture, node->is_hdr = color_state_is_hdr (gdk_texture_get_color_state (texture)); self->texture = g_object_ref (texture); @@ -1097,7 +1086,7 @@ index 1111111..2222222 100644 #include "gskroundedrectprivate.h" #include "gskrendernodeprivate.h" #include "gskstroke.h" -@@ -1803,6 +1804,51 @@ parse_mask_mode (GtkCssParser *parser, +@@ -1106,6 +1107,51 @@ parse_mask_mode (GtkCssParser *parser, return FALSE; } @@ -1149,7 +1138,7 @@ index 1111111..2222222 100644 static PangoFont * font_from_string (PangoFontMap *fontmap, const char *string, -@@ -2961,9 +3007,11 @@ parse_texture_node (GtkCssParser *parser, +@@ -2239,9 +2285,11 @@ parse_texture_node (GtkCssParser *parser, { graphene_rect_t bounds = GRAPHENE_RECT_INIT (0, 0, 50, 50); GdkTexture *texture = NULL; @@ -1162,7 +1151,7 @@ index 1111111..2222222 100644 }; GskRenderNode *node; -@@ -2972,7 +3020,7 @@ parse_texture_node (GtkCssParser *parser, +@@ -2250,7 +2298,7 @@ parse_texture_node (GtkCssParser *parser, if (texture == NULL) texture = create_default_texture (); @@ -1171,7 +1160,7 @@ index 1111111..2222222 100644 g_object_unref (texture); return node; -@@ -4532,6 +4580,58 @@ append_enum_param (Printer *p, +@@ -3857,6 +3905,58 @@ append_enum_param (Printer *p, g_string_append_c (p->str, '\n'); } @@ -1230,7 +1219,7 @@ index 1111111..2222222 100644 static void append_vec4_param (Printer *p, const char *param_name, -@@ -5643,6 +5743,7 @@ render_node_print (Printer *p, +@@ -4726,6 +4826,7 @@ render_node_print (Printer *p, append_rect_param (p, "bounds", &node->bounds); append_texture_param (p, "texture", gsk_texture_node_get_texture (node)); @@ -1252,7 +1241,7 @@ diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 1111111..2222222 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c -@@ -2143,6 +2143,7 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, +@@ -2137,6 +2137,7 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, GskGpuImage *image; GdkTexture *texture; gboolean should_mipmap; @@ -1260,7 +1249,7 @@ index 1111111..2222222 100644 texture = gsk_texture_node_get_texture (node); should_mipmap = texture_node_should_mipmap (node, self->frame, &self->scale); -@@ -2175,6 +2176,12 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, +@@ -2169,6 +2170,12 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, return; } @@ -1272,8 +1261,8 @@ index 1111111..2222222 100644 + if (should_mipmap) { - if ((gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_CAN_MIPMAP) != GSK_GPU_IMAGE_CAN_MIPMAP || -@@ -2197,8 +2204,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, + if ((gsk_gpu_image_get_flags (image) & (GSK_GPU_IMAGE_STRAIGHT_ALPHA | GSK_GPU_IMAGE_CAN_MIPMAP)) != GSK_GPU_IMAGE_CAN_MIPMAP || +@@ -2189,8 +2196,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, image, image_cs, GSK_GPU_SAMPLER_MIPMAP_DEFAULT, @@ -1284,7 +1273,7 @@ index 1111111..2222222 100644 } else { -@@ -2206,8 +2213,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, +@@ -2198,8 +2205,8 @@ gsk_gpu_node_processor_add_texture_node (GskGpuNodeProcessor *self, image, image_cs, GSK_GPU_SAMPLER_DEFAULT, @@ -1294,8 +1283,8 @@ index 1111111..2222222 100644 + &bounds); } - gdk_color_state_unref (image_cs); -@@ -2251,6 +2258,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, + g_object_unref (image); +@@ -2242,6 +2249,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, GdkColorState *image_cs; GskGpuImage *image; gboolean should_mipmap; @@ -1303,7 +1292,7 @@ index 1111111..2222222 100644 if ((flags & GSK_GPU_AS_IMAGE_EXACT_SIZE) && !gsk_rect_equal (clip_bounds, &node->bounds)) -@@ -2258,6 +2266,11 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, +@@ -2249,6 +2257,11 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, should_mipmap = texture_node_should_mipmap (node, frame, scale); image = gsk_gpu_lookup_texture (frame, ccs, texture, FALSE, &image_cs); @@ -1315,7 +1304,7 @@ index 1111111..2222222 100644 if (image == NULL) { -@@ -2265,7 +2278,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, +@@ -2256,7 +2269,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, ccs, clip_bounds, scale, @@ -1324,10 +1313,10 @@ index 1111111..2222222 100644 gsk_texture_node_get_texture (node), should_mipmap ? GSK_SCALING_FILTER_TRILINEAR : GSK_SCALING_FILTER_LINEAR); *out_bounds = *clip_bounds; -@@ -2294,7 +2307,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, +@@ -2278,7 +2291,7 @@ gsk_gpu_get_texture_node_as_image (GskGpuFrame *frame, + ccs); } - gdk_color_state_unref (image_cs); - *out_bounds = node->bounds; + *out_bounds = bounds; return image; @@ -1349,7 +1338,7 @@ diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 1111111..2222222 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c -@@ -1109,6 +1109,23 @@ add_texture_rows (GListStore *store, +@@ -1027,6 +1027,23 @@ add_texture_rows (GListStore *store, } } @@ -1373,7 +1362,7 @@ index 1111111..2222222 100644 static void populate_render_node_properties (GListStore *store, GskRenderNode *node, -@@ -1178,6 +1195,7 @@ populate_render_node_properties (GListStore *store, +@@ -1096,6 +1113,7 @@ populate_render_node_properties (GListStore *store, GdkTexture *texture = gsk_texture_node_get_texture (node); add_texture_rows (store, texture); @@ -1394,7 +1383,7 @@ diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 1111111..2222222 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c -@@ -2465,7 +2465,8 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, +@@ -2437,7 +2437,8 @@ gtk_snapshot_append_texture (GtkSnapshot *snapshot, gtk_snapshot_ensure_affine (snapshot, &scale_x, &scale_y, &dx, &dy); gtk_graphene_rect_scale_affine (bounds, scale_x, scale_y, dx, dy, &real_bounds); @@ -1439,7 +1428,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -3057,6 +3057,8 @@ struct _GskTextureScaleNode +@@ -2979,6 +2979,8 @@ struct _GskTextureScaleNode GdkTexture *texture; GskScalingFilter filter; @@ -1448,7 +1437,7 @@ index 1111111..2222222 100644 }; static void -@@ -3143,6 +3145,7 @@ gsk_texture_scale_node_diff (GskRenderNode *node1, +@@ -3065,6 +3067,7 @@ gsk_texture_scale_node_diff (GskRenderNode *node1, if (!gsk_rect_equal (&node1->bounds, &node2->bounds) || self1->filter != self2->filter || @@ -1456,7 +1445,7 @@ index 1111111..2222222 100644 gdk_texture_get_width (self1->texture) != gdk_texture_get_width (self2->texture) || gdk_texture_get_height (self1->texture) != gdk_texture_get_height (self2->texture)) { -@@ -3213,6 +3216,24 @@ gsk_texture_scale_node_get_filter (const GskRenderNode *node) +@@ -3135,6 +3138,24 @@ gsk_texture_scale_node_get_filter (const GskRenderNode *node) return self->filter; } @@ -1481,7 +1470,7 @@ index 1111111..2222222 100644 /** * gsk_texture_scale_node_new: * @texture: the texture to scale -@@ -3240,6 +3261,43 @@ GskRenderNode * +@@ -3162,6 +3183,43 @@ GskRenderNode * gsk_texture_scale_node_new (GdkTexture *texture, const graphene_rect_t *bounds, GskScalingFilter filter) @@ -1525,7 +1514,7 @@ index 1111111..2222222 100644 { GskTextureScaleNode *self; GskRenderNode *node; -@@ -3259,6 +3317,7 @@ gsk_texture_scale_node_new (GdkTexture *texture, +@@ -3181,6 +3239,7 @@ gsk_texture_scale_node_new (GdkTexture *texture, gsk_rect_init_from_rect (&node->bounds, bounds); gsk_rect_normalize (&node->bounds); self->filter = filter; @@ -1546,7 +1535,7 @@ diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c -@@ -3033,10 +3033,12 @@ parse_texture_scale_node (GtkCssParser *parser, +@@ -2311,10 +2311,12 @@ parse_texture_scale_node (GtkCssParser *parser, graphene_rect_t bounds = GRAPHENE_RECT_INIT (0, 0, 50, 50); GdkTexture *texture = NULL; GskScalingFilter filter = GSK_SCALING_FILTER_LINEAR; @@ -1560,7 +1549,7 @@ index 1111111..2222222 100644 }; GskRenderNode *node; -@@ -3045,7 +3047,7 @@ parse_texture_scale_node (GtkCssParser *parser, +@@ -2323,7 +2325,7 @@ parse_texture_scale_node (GtkCssParser *parser, if (texture == NULL) texture = create_default_texture (); @@ -1569,7 +1558,7 @@ index 1111111..2222222 100644 g_object_unref (texture); return node; -@@ -5770,6 +5772,8 @@ render_node_print (Printer *p, +@@ -4853,6 +4855,8 @@ render_node_print (Printer *p, } append_texture_param (p, "texture", gsk_texture_scale_node_get_texture (node)); @@ -1592,7 +1581,7 @@ diff --git a/gsk/gpu/gskgpunodeprocessor.c b/gsk/gpu/gskgpunodeprocessor.c index 1111111..2222222 100644 --- a/gsk/gpu/gskgpunodeprocessor.c +++ b/gsk/gpu/gskgpunodeprocessor.c -@@ -2320,6 +2320,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2304,6 +2304,7 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, GdkColorState *image_cs; GskScalingFilter scaling_filter; gboolean need_mipmap, need_offscreen; @@ -1600,7 +1589,7 @@ index 1111111..2222222 100644 texture = gsk_texture_scale_node_get_texture (node); scaling_filter = gsk_texture_scale_node_get_filter (node); -@@ -2388,6 +2389,12 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2367,6 +2368,12 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, return; } @@ -1610,10 +1599,10 @@ index 1111111..2222222 100644 + &self->offset, + &bounds); + - if (gsk_gpu_image_get_shader_op (image) != GDK_SHADER_DEFAULT || + if ((gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_STRAIGHT_ALPHA) || (need_mipmap && !(gsk_gpu_image_get_flags (image) & GSK_GPU_IMAGE_CAN_MIPMAP)) || !gdk_color_state_equal (image_cs, self->ccs)) -@@ -2405,13 +2412,13 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, +@@ -2383,13 +2390,13 @@ gsk_gpu_node_processor_add_texture_scale_node (GskGpuNodeProcessor *self, gsk_gpu_mipmap_op (self->frame, image); gsk_gpu_texture_op (self->frame, @@ -1629,7 +1618,7 @@ index 1111111..2222222 100644 + &bounds, }); - gdk_color_state_unref (image_cs); + g_object_unref (image); From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Matthias Clasen @@ -1644,7 +1633,7 @@ diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 1111111..2222222 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c -@@ -1209,6 +1209,7 @@ populate_render_node_properties (GListStore *store, +@@ -1127,6 +1127,7 @@ populate_render_node_properties (GListStore *store, tmp = g_enum_to_string (GSK_TYPE_SCALING_FILTER, filter); add_text_row (store, "Filter", "%s", tmp); @@ -1666,7 +1655,7 @@ diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index 1111111..2222222 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c -@@ -2494,6 +2494,7 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, +@@ -2466,6 +2466,7 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, GskScalingFilter filter, const graphene_rect_t *bounds) { @@ -1674,7 +1663,7 @@ index 1111111..2222222 100644 GskRenderNode *node; g_return_if_fail (snapshot != NULL); -@@ -2501,7 +2502,11 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, +@@ -2473,7 +2474,11 @@ gtk_snapshot_append_scaled_texture (GtkSnapshot *snapshot, g_return_if_fail (bounds != NULL); gtk_snapshot_ensure_identity (snapshot); @@ -1699,7 +1688,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -2867,6 +2867,7 @@ gsk_texture_node_draw (GskRenderNode *node, +@@ -2789,6 +2789,7 @@ gsk_texture_node_draw (GskRenderNode *node, cairo_pattern_t *pattern; cairo_matrix_t matrix; int width, height; @@ -1707,7 +1696,7 @@ index 1111111..2222222 100644 width = gdk_texture_get_width (self->texture); height = gdk_texture_get_height (self->texture); -@@ -2880,19 +2881,21 @@ gsk_texture_node_draw (GskRenderNode *node, +@@ -2802,19 +2803,21 @@ gsk_texture_node_draw (GskRenderNode *node, pattern = cairo_pattern_create_for_surface (surface); cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); @@ -1746,7 +1735,7 @@ diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index 1111111..2222222 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c -@@ -3092,9 +3092,14 @@ gsk_texture_scale_node_draw (GskRenderNode *node, +@@ -3014,9 +3014,14 @@ gsk_texture_scale_node_draw (GskRenderNode *node, cairo_t *cr2; cairo_surface_t *surface2; graphene_rect_t clip_rect; @@ -1762,7 +1751,7 @@ index 1111111..2222222 100644 cairo_clip (cr); _graphene_rect_init_from_clip_extents (&clip_rect, cr); if (clip_rect.size.width <= 0 || clip_rect.size.height <= 0) -@@ -3111,9 +3116,9 @@ gsk_texture_scale_node_draw (GskRenderNode *node, +@@ -3033,9 +3038,9 @@ gsk_texture_scale_node_draw (GskRenderNode *node, cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); cairo_matrix_init_scale (&matrix, @@ -1775,7 +1764,7 @@ index 1111111..2222222 100644 cairo_pattern_set_matrix (pattern, &matrix); cairo_pattern_set_filter (pattern, filters[self->filter]); -@@ -3121,7 +3126,7 @@ gsk_texture_scale_node_draw (GskRenderNode *node, +@@ -3043,7 +3048,7 @@ gsk_texture_scale_node_draw (GskRenderNode *node, cairo_pattern_destroy (pattern); cairo_surface_destroy (surface); diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index 8965b38d..f1f58436 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -10,7 +10,6 @@ $(PKG)_DEPS := cc meson-wrapper gtk4 vips-all define $(PKG)_PRE_CONFIGURE (printf '{\n'; \ - printf ' "directx-headers": "$(directx-headers_VERSION)",\n'; \ printf ' "epoxy": "$(libepoxy_VERSION)",\n'; \ printf ' "graphene": "$(graphene_VERSION)",\n'; \ printf ' "gtk": "$(gtk4_VERSION)",\n'; \ diff --git a/packaging/package-gtk.sh b/packaging/package-gtk.sh index cbf721a5..61030792 100755 --- a/packaging/package-gtk.sh +++ b/packaging/package-gtk.sh @@ -92,8 +92,8 @@ fi echo "Copying $package and dependencies" -# A few more DLLs are required to be whitelisted for GTK -whitelist+=(d3d1{1,2}.dll dcomp.dll dwrite.dll dxgi.dll hid.dll opengl32.dll shcore.dll) +# Whitelist dwrite.dll, hid.dll and opengl32.dll for GTK +whitelist+=(dwrite.dll hid.dll opengl32.dll) # Copy libvips and dependencies with pe-util for pe_target in "${pe_targets[@]}"; do From 24e642d0a933e2a866a9fc430d5ad642011703cc Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 31 Jul 2025 10:48:59 +0200 Subject: [PATCH 13/16] Revert "Try `gsk_cairo_rectangle_pixel_aligned()`" This reverts commit 14780e02d1d1004b202a1e4fb098f7784c5e1c36. --- build/plugins/gtk4/patches/gtk-4-mr-8494.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch index ed5447ea..c72dbe60 100644 --- a/build/plugins/gtk4/patches/gtk-4-mr-8494.patch +++ b/build/plugins/gtk4/patches/gtk-4-mr-8494.patch @@ -1747,7 +1747,7 @@ index 1111111..2222222 100644 /* Make sure we draw the minimum region by using the clip */ - gdk_cairo_rect (cr, &node->bounds); -+ gsk_cairo_rectangle_pixel_aligned (cr, &bounds); ++ gdk_cairo_rect (cr, &bounds); cairo_clip (cr); _graphene_rect_init_from_clip_extents (&clip_rect, cr); if (clip_rect.size.width <= 0 || clip_rect.size.height <= 0) From 16a658063924daa491dddbcfabb512629f22e68e Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 31 Jul 2025 15:51:42 +0200 Subject: [PATCH 14/16] Update vipsdisp to 4.1.0-high-dpi2 --- build/vipsdisp.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index f1f58436..f2c9991e 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -2,10 +2,12 @@ PKG := vipsdisp $(PKG)_WEBSITE := https://github.com/jcupitt/vipsdisp $(PKG)_DESCR := Tiny libvips / gtk+4 image viewer $(PKG)_IGNORE := -$(PKG)_VERSION := 4.1.0 -$(PKG)_CHECKSUM := 51a1105f27e495fdd8e55a8628c4f688f28f900475efc479c9a7202ba59f09c2 +$(PKG)_VERSION := 4.1.0-high-dpi2 +$(PKG)_CHECKSUM := 4747b4bafacb7cd8ef8ca0cddeaa1ceb224578d5ab2e2f90c0ffc3b5fc335808 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) -$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,.tar.xz +$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,-high-dpi2.tar.xz +$(PKG)_SUBDIR := $(PKG)-$(firstword $(subst -, ,$($(PKG)_VERSION))) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz $(PKG)_DEPS := cc meson-wrapper gtk4 vips-all define $(PKG)_PRE_CONFIGURE From b2661ed858b0229fd9473d4a9899708e82a7a934 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 31 Jul 2025 21:55:01 +0200 Subject: [PATCH 15/16] Update vipsdisp to 4.1.1 --- build/vipsdisp.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build/vipsdisp.mk b/build/vipsdisp.mk index f2c9991e..b4ca7caa 100644 --- a/build/vipsdisp.mk +++ b/build/vipsdisp.mk @@ -2,12 +2,10 @@ PKG := vipsdisp $(PKG)_WEBSITE := https://github.com/jcupitt/vipsdisp $(PKG)_DESCR := Tiny libvips / gtk+4 image viewer $(PKG)_IGNORE := -$(PKG)_VERSION := 4.1.0-high-dpi2 -$(PKG)_CHECKSUM := 4747b4bafacb7cd8ef8ca0cddeaa1ceb224578d5ab2e2f90c0ffc3b5fc335808 +$(PKG)_VERSION := 4.1.1 +$(PKG)_CHECKSUM := 2a3378ab2f0e427effdcaab5025580e60c2937b04bbecb2a1a9346adc48dbe10 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch))) -$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,-high-dpi2.tar.xz -$(PKG)_SUBDIR := $(PKG)-$(firstword $(subst -, ,$($(PKG)_VERSION))) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz +$(PKG)_GH_CONF := jcupitt/vipsdisp/releases,v,,,,.tar.xz $(PKG)_DEPS := cc meson-wrapper gtk4 vips-all define $(PKG)_PRE_CONFIGURE From 8c3beab3cfb55ef536dfa3d51980ef3786c7b0a4 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Fri, 1 Aug 2025 10:23:09 +0200 Subject: [PATCH 16/16] Final updates --- README.md | 4 +++- build/patches/vips-8-dlldir-as-libdir.patch | 4 ++-- build/vips-web.mk | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f5b5e31b..e6067a16 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Run the top-level [build script](build.sh) with the `--help` parameter for help. | [librsvg] | 2.60.0 | LGPLv3 | | [libspng] | 0.7.4 | BSD 2-Clause | | [libtiff] | 4.7.0 | [libtiff License] (BSD-like) | -| [libvips] | 8.17.1 | LGPLv3 | +| [libvips] | 8.18.0² | LGPLv3 | | [libwebp] | 1.6.0 | New BSD License | | [libxml2] | 2.14.5 | MIT Licence | | [mozjpeg] | 4.1.5 | [zlib License, IJG License, BSD-3-Clause] | @@ -47,6 +47,8 @@ Run the top-level [build script](build.sh) with the `--help` parameter for help. | [zlib-ng] | 2.2.4 | [zlib-ng Licence] | ¹ [A fork](https://github.com/lovell/libimagequant) of the BSD 2-Clause licensed libimagequant v2.4.1 is used. +² libvips is built from the [`v8.18.0-test1`](https://github.com/libvips/libvips/tree/v8.18.0-test1) tag, see: +https://github.com/libvips/libvips/releases/tag/v8.18.0-test1 [aom]: https://aomedia.googlesource.com/aom/ [Alliance for Open Media Patent License 1.0]: https://aomedia.org/license/patent-license/ diff --git a/build/patches/vips-8-dlldir-as-libdir.patch b/build/patches/vips-8-dlldir-as-libdir.patch index 0aab8ec1..d7b18dee 100644 --- a/build/patches/vips-8-dlldir-as-libdir.patch +++ b/build/patches/vips-8-dlldir-as-libdir.patch @@ -9,7 +9,7 @@ diff --git a/libvips/include/vips/internal.h b/libvips/include/vips/internal.h index 1111111..2222222 100644 --- a/libvips/include/vips/internal.h +++ b/libvips/include/vips/internal.h -@@ -426,6 +426,7 @@ guint32 vips__random(guint32 seed); +@@ -427,6 +427,7 @@ guint32 vips__random(guint32 seed); guint32 vips__random_add(guint32 seed, int value); const char *vips__icc_dir(void); @@ -46,7 +46,7 @@ diff --git a/libvips/iofuncs/util.c b/libvips/iofuncs/util.c index 1111111..2222222 100644 --- a/libvips/iofuncs/util.c +++ b/libvips/iofuncs/util.c -@@ -1986,6 +1986,53 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +@@ -1992,6 +1992,53 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } #endif diff --git a/build/vips-web.mk b/build/vips-web.mk index ed977efb..42364c81 100644 --- a/build/vips-web.mk +++ b/build/vips-web.mk @@ -2,11 +2,11 @@ PKG := vips-web $(PKG)_WEBSITE := https://libvips.github.io/libvips/ $(PKG)_DESCR := A fast image processing library with low memory needs. $(PKG)_IGNORE := -$(PKG)_VERSION := 8.17.1 -$(PKG)_CHECKSUM := 4d8c3325922c5300253d7594507a8f1d3caf8eed70dfb66cc7eb2cbed65bb5ca +$(PKG)_VERSION := 8.18.0-test1 +$(PKG)_CHECKSUM := 242eaa2c195fd5a3021e5daaa4448cdbfa5b9702ec4377cbb9b2b18c4f542163 $(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/vips-[0-9]*.patch))) -$(PKG)_GH_CONF := libvips/libvips/releases,v,,,,.tar.xz -$(PKG)_SUBDIR := vips-$($(PKG)_VERSION) +$(PKG)_GH_CONF := libvips/libvips/releases,v,,,,-test1.tar.xz +$(PKG)_SUBDIR := vips-$(firstword $(subst -, ,$($(PKG)_VERSION))) $(PKG)_FILE := vips-$($(PKG)_VERSION).tar.xz $(PKG)_DEPS := cc meson-wrapper libwebp librsvg glib pango libarchive \ libjpeg-turbo tiff lcms libexif libheif libspng \ @@ -83,6 +83,7 @@ define $(PKG)_BUILD -Dpdfium=disabled \ -Dpoppler=disabled \ -Dquantizr=disabled \ + -Draw=disabled \ -Dppm=false \ -Danalyze=false \ -Dradiance=false \