diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 9bb664dd..2471e46f 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -36,7 +36,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Install @@ -161,7 +161,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Set up QEMU @@ -619,7 +619,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Install @@ -680,7 +680,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Install dependencies diff --git a/.github/workflows/skia.yaml b/.github/workflows/skia.yaml index baaa931e..ba28560b 100644 --- a/.github/workflows/skia.yaml +++ b/.github/workflows/skia.yaml @@ -35,7 +35,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - uses: actions/setup-python@v5 @@ -117,7 +117,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - uses: actions/setup-python@v5 @@ -162,7 +162,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Login to GitHub Container Registry @@ -191,7 +191,7 @@ jobs: build-aarch64-linux-gnu: if: "!contains(github.event.head_commit.message, 'skip skia')" - name: stable - aarch64-linux - build skia + name: stable - aarch64-linux-gnu - build skia runs-on: ubuntu-latest steps: @@ -202,7 +202,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - uses: actions/setup-python@v5 @@ -242,7 +242,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - name: Login to GitHub Container Registry @@ -282,7 +282,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - uses: actions/setup-python@v5 @@ -306,10 +306,10 @@ jobs: - name: Install cross compile tools run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee -a /etc/apt/sources.list > /dev/null - echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee -a /etc/apt/sources.list > /dev/null + echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee -a /etc/apt/sources.list > /dev/null + echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee -a /etc/apt/sources.list > /dev/null sudo apt-get update - sudo apt-get install llvm-16 clang-16 lld-16 gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y + sudo apt-get install llvm-18 clang-18 lld-18 gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y docker run --rm --privileged multiarch/qemu-user-static --reset -p yes docker buildx build --load --platform linux/arm/v7 -t ubuntu:jammy-armv7 . -f jammy-armv7.Dockerfile docker run --rm -dt --name ubuntu-jammy-armv7 ubuntu:jammy-armv7 @@ -343,7 +343,7 @@ jobs: - name: Setup node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: 'yarn' - uses: actions/setup-python@v5 diff --git a/README-zh.md b/README-zh.md index ea6314f6..2686b060 100644 --- a/README-zh.md +++ b/README-zh.md @@ -1,7 +1,7 @@ # `skr canvas` ![CI](https://github.com/Brooooooklyn/canvas/workflows/CI/badge.svg) -![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm122-hotpink) +![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm123-hotpink) [![install size](https://packagephobia.com/badge?p=@napi-rs/canvas)](https://packagephobia.com/result?p=@napi-rs/canvas) [![Downloads](https://img.shields.io/npm/dm/@napi-rs/canvas.svg?sanitize=true)](https://npmcharts.com/compare/@napi-rs/canvas?minimal=true) diff --git a/README.md b/README.md index 16b564f9..cbfa8c07 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # `skr canvas` ![CI](https://github.com/Brooooooklyn/canvas/workflows/CI/badge.svg) -![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm122-hotpink) +![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm123-hotpink) [![install size](https://packagephobia.com/badge?p=@napi-rs/canvas)](https://packagephobia.com/result?p=@napi-rs/canvas) [![Downloads](https://img.shields.io/npm/dm/@napi-rs/canvas.svg?sanitize=true)](https://npmcharts.com/compare/@napi-rs/canvas?minimal=true) diff --git a/__test__/snapshots/draw-image-svg-noto-emoji.png b/__test__/snapshots/draw-image-svg-noto-emoji.png index 58f6ffe4..aee9d2c6 100644 Binary files a/__test__/snapshots/draw-image-svg-noto-emoji.png and b/__test__/snapshots/draw-image-svg-noto-emoji.png differ diff --git a/__test__/snapshots/drawImage-svg-resize.png b/__test__/snapshots/drawImage-svg-resize.png index be0fc0bd..64be941a 100644 Binary files a/__test__/snapshots/drawImage-svg-resize.png and b/__test__/snapshots/drawImage-svg-resize.png differ diff --git a/__test__/snapshots/fillText-COLRv1.png b/__test__/snapshots/fillText-COLRv1.png index 37e522c4..bd02b7c3 100644 Binary files a/__test__/snapshots/fillText-COLRv1.png and b/__test__/snapshots/fillText-COLRv1.png differ diff --git a/__test__/snapshots/filter-blur.png b/__test__/snapshots/filter-blur.png index 172338b5..b4c37115 100644 Binary files a/__test__/snapshots/filter-blur.png and b/__test__/snapshots/filter-blur.png differ diff --git a/build.rs b/build.rs index f136ad54..d1cc1f17 100644 --- a/build.rs +++ b/build.rs @@ -166,14 +166,14 @@ fn main() { "/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include", ) .flag("--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot"); - println!("cargo:rustc-link-search=/usr/aarch64-unknown-linux-gnu/lib/llvm-16/lib"); + println!("cargo:rustc-link-search=/usr/aarch64-unknown-linux-gnu/lib/llvm-18/lib"); println!("cargo:rustc-link-search=/usr/aarch64-unknown-linux-gnu/lib"); println!("cargo:rustc-link-search=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/lib"); println!("cargo:rustc-link-search=/usr/aarch64-unknown-linux-gnu/lib/gcc/aarch64-unknown-linux-gnu/4.8.5"); } "x86_64" => { - build.include("/usr/lib/llvm-16/include/c++/v1"); - println!("cargo:rustc-link-search=/usr/lib/llvm-16/lib"); + build.include("/usr/lib/llvm-18/include/c++/v1"); + println!("cargo:rustc-link-search=/usr/lib/llvm-18/lib"); } "arm" => { let gcc_version = String::from_utf8( diff --git a/scripts/build-skia.js b/scripts/build-skia.js index 76b06de8..c1ae3bff 100644 --- a/scripts/build-skia.js +++ b/scripts/build-skia.js @@ -133,7 +133,7 @@ switch (PLATFORM_NAME) { HOST_LIBC === 'glibc' && HOST_ARCH === 'x64' ) { - ExtraCflagsCC += ',"-stdlib=libc++","-static","-I/usr/lib/llvm-16/include/c++/v1"' + ExtraCflagsCC += ',"-stdlib=libc++","-static","-I/usr/lib/llvm-18/include/c++/v1"' } if (PLATFORM_NAME === 'linux' && (!TARGET_TRIPLE || TARGET_TRIPLE.startsWith('x86_64'))) { ExtraCflagsCC += ',"-Wno-psabi"' @@ -149,14 +149,14 @@ switch (TARGET_TRIPLE) { ExtraCflags = '"--target=aarch64-unknown-linux-gnu", "--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot", "-I/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include", "-march=armv8-a"' ExtraCflagsCC += - ', "--target=aarch64-unknown-linux-gnu", "--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot", "-I/usr/lib/llvm-16/include/c++/v1", "-I/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include", "-march=armv8-a"' + ', "--target=aarch64-unknown-linux-gnu", "--sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot", "-I/usr/lib/llvm-18/include/c++/v1", "-I/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include", "-march=armv8-a"' ExtraLdFlags = - '"-fuse-ld=lld", "-L/usr/aarch64-unknown-linux-gnu/lib/llvm-16/lib", "-L/usr/aarch64-unknown-linux-gnu/lib", "-L/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/lib", "-L/usr/aarch64-unknown-linux-gnu/lib/gcc/aarch64-unknown-linux-gnu/4.8.5"' + '"-fuse-ld=lld", "-L/usr/aarch64-unknown-linux-gnu/lib/llvm-18/lib", "-L/usr/aarch64-unknown-linux-gnu/lib", "-L/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/lib", "-L/usr/aarch64-unknown-linux-gnu/lib/gcc/aarch64-unknown-linux-gnu/4.8.5"' ExtraAsmFlags = '"--target=aarch64-unknown-linux-gnu", "-march=armv8-a"' GN_ARGS.push( `extra_ldflags=[${ExtraLdFlags}]`, - `ar="llvm-ar-16"`, + `ar="llvm-ar-18"`, `extra_asmflags=[${ExtraAsmFlags}]`, `extra_cflags=[${ExtraCflags}]`, `extra_cflags_c=[${ExtraCflags}]`, @@ -189,7 +189,7 @@ switch (TARGET_TRIPLE) { GN_ARGS.push( `extra_ldflags=[${ExtraLdFlags}]`, - `ar="llvm-ar-16"`, + `ar="llvm-ar-18"`, `extra_asmflags=[${ExtraAsmFlags}]`, `extra_cflags=[${ExtraCflags}]`, `extra_cflags_c=[${ExtraCflags}]`, diff --git a/skia b/skia index 98287499..aeae2261 160000 --- a/skia +++ b/skia @@ -1 +1 @@ -Subproject commit 982874994d829e7a9c1aa38f429a66cd32a2d0a2 +Subproject commit aeae2261c7d380404fb8e53eb6062338c4ba0367