Skip to content

Commit

Permalink
feat: chrome/m123 (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Feb 22, 2024
1 parent 3245ff6 commit a70a8d4
Show file tree
Hide file tree
Showing 87 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI.yaml
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: Install
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -619,7 +619,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: Install
Expand Down Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/skia.yaml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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)

Expand Down
2 changes: 1 addition & 1 deletion 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)

Expand Down
2 changes: 1 addition & 1 deletion __test__/regression.spec.ts
Expand Up @@ -188,7 +188,7 @@ test('draw-svg-with-text', async (t) => {
const Arrow = new Image()
Arrow.src = await fs.readFile(join(__dirname, 'image-og.svg'))
ctx.drawImage(Arrow, 80, 60)
await snapshotImage(t, { ctx, canvas }, 'png', process.arch === 'x64' && process.platform !== 'darwin' ? 0.015 : 0.3)
await snapshotImage(t, { ctx, canvas }, 'png', process.arch === 'x64' && process.platform !== 'darwin' ? 0.15 : 0.3)
})

test('DOMMatrix::transformPoint', (t) => {
Expand Down
Binary file modified __test__/snapshots/arc.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/arcTo-colorful.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/arcTo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/beginPath.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/bezierCurveTo-colorful.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/bezierCurveTo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/clearRect.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/clip.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/closePath-arc.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/closePath.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/composition-destination-in.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/composition-source-in.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/createConicGradient.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/createPattern-no-transform-imagedata.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/createPattern-no-transform.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/createPattern-with-transform.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/createRadialGradient.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/draw-image-svg-noto-emoji.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/draw-svg-with-text.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/draw-text-center-maxWidth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/draw-text-maxWidth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/draw-text-right-maxWidth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/drawImage-another-Canvas.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/drawImage-svg-resize.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/drawImage.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __test__/snapshots/echarts-start.png
Binary file modified __test__/snapshots/ellipse.png
Binary file modified __test__/snapshots/fill-alpha-should-not-effect-drawImage.png
Binary file modified __test__/snapshots/fill.png
Binary file modified __test__/snapshots/fillText-AA.png
Binary file modified __test__/snapshots/fillText-COLRv1.png
Binary file modified __test__/snapshots/fillText-line-break-as-space.png
Binary file modified __test__/snapshots/fillText-maxWidth.png
Binary file modified __test__/snapshots/fillText.png
Binary file modified __test__/snapshots/filter-blur.png
Binary file modified __test__/snapshots/filter-brightness.png
Binary file modified __test__/snapshots/filter-combine-contrast-brightness.png
Binary file modified __test__/snapshots/filter-contrast-ff.png
Binary file modified __test__/snapshots/filter-contrast.png
Binary file modified __test__/snapshots/filter-drop-shadow.png
Binary file modified __test__/snapshots/filter-grayscale.png
Binary file modified __test__/snapshots/filter-hue-rotate.png
Binary file modified __test__/snapshots/filter-invert.png
Binary file modified __test__/snapshots/filter-opacity.png
Binary file modified __test__/snapshots/filter-saturate.png
Binary file modified __test__/snapshots/filter-save-restore.png
Binary file modified __test__/snapshots/filter-sepia.png
Binary file modified __test__/snapshots/getImageData.png
Binary file modified __test__/snapshots/global-alpha-should-effect-drawImage.png
Binary file modified __test__/snapshots/lineTo-with-invalid-point.png
Binary file modified __test__/snapshots/lineTo.png
Binary file modified __test__/snapshots/moveTo.png
Binary file modified __test__/snapshots/quadraticCurveTo.png
Binary file modified __test__/snapshots/rect.png
Binary file modified __test__/snapshots/resetTransform.png
Binary file modified __test__/snapshots/rotate.png
Binary file modified __test__/snapshots/save-restore.png
Binary file modified __test__/snapshots/setLineDash.png
Binary file modified __test__/snapshots/setTransform matrix.png
Binary file modified __test__/snapshots/setTransform.png
Binary file modified __test__/snapshots/shadowOffsetX.png
Binary file modified __test__/snapshots/shadowOffsetY.png
Binary file modified __test__/snapshots/stroke.png
Binary file modified __test__/snapshots/strokeRect.png
Binary file modified __test__/snapshots/strokeRoundRect.png
Binary file modified __test__/snapshots/strokeText-line-break-as-space.png
Binary file modified __test__/snapshots/strokeText.png
Binary file modified __test__/snapshots/svg-transparent-background.png
Binary file modified __test__/snapshots/text-align-center.png
Binary file modified __test__/snapshots/text-align-end.png
Binary file modified __test__/snapshots/text-align-left.png
Binary file modified __test__/snapshots/text-align-right.png
Binary file modified __test__/snapshots/text-align-start.png
Binary file modified __test__/snapshots/text-align-with-space.png
Binary file modified __test__/snapshots/text-baseline-all.png
Binary file modified __test__/snapshots/text-baseline.png
Binary file modified __test__/snapshots/transform-with-radial-gradient-x.png
Binary file modified __test__/snapshots/transform-with-radial-gradient.png
Binary file modified __test__/snapshots/transform.png
6 changes: 3 additions & 3 deletions build.rs
Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions scripts/build-skia.js
Expand Up @@ -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"'
Expand All @@ -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}]`,
Expand Down Expand Up @@ -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}]`,
Expand Down
2 changes: 1 addition & 1 deletion skia
Submodule skia updated 855 files

0 comments on commit a70a8d4

Please sign in to comment.