Skip to content

Commit

Permalink
feat: chrome/m116
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jun 8, 2024
1 parent 952acd0 commit c6af883
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.11.0
version: 0.13.0

- name: Set env
if: matrix.settings.host == 'windows-latest'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/skia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]

name: stable - ${{ matrix.os }} - build skia
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Install tools on macOS
run: brew install ninja llvm
if: matrix.os == 'macos-14'
if: matrix.os == 'macos-latest'

- name: Install tools on Windows
if: matrix.os == 'windows-latest'
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
docker run --user "$(id -u):$(id -g)" -e PYTHONHTTPSVERIFY=0 -e SKIP_SYNC_SK_DEPS=0 --rm -v $(pwd):/canvas -w /canvas builder node ./scripts/build-skia.js
- name: Compile skia
if: matrix.os == 'macos-14'
if: matrix.os == 'macos-latest'
env:
PYTHONHTTPSVERIFY: 0
run: |
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip skia')"

name: stable - apple-silicon - build skia
runs-on: macos-14
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -313,9 +313,9 @@ jobs:
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
sudo mkdir -p /usr/arm-linux-gnueabihf/lib/llvm-14
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-14/lib /usr/arm-linux-gnueabihf/lib/llvm-14/lib
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-14/include /usr/arm-linux-gnueabihf/lib/llvm-14/include
sudo mkdir -p /usr/arm-linux-gnueabihf/lib/llvm-18
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-18/lib /usr/arm-linux-gnueabihf/lib/llvm-18/lib
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-18/include /usr/arm-linux-gnueabihf/lib/llvm-18/include
docker stop ubuntu-jammy-armv7
- name: Compile skia
Expand Down
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
@@ -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%2Fm125-hotpink)
![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm126-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
Original file line number Diff line number Diff line change
@@ -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%2Fm125-hotpink)
![Skia Version](https://img.shields.io/badge/Skia-chrome%2Fm126-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
39 changes: 13 additions & 26 deletions __test__/pathkit.spec.ts

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions __test__/pathkit.spec.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@ The actual snapshot is saved in `pathkit.spec.ts.snap`.

Generated by [AVA](https://avajs.dev).

## Union boolean operation

> Snapshot 1
'M142 0L58 0C53.581699 0 50 3.5817201 50 8L50 50L8 50C3.5817201 50 0 53.581699 0 58L0 142C0 146.418 3.5817201 150 8 150L92 150C96.418297 150 100 146.418 100 142L100 100L142 100C146.418 100 150 96.418297 150 92L150 8C150 3.5817201 146.418 0 142 0Z'

## Xor boolean operation

> Snapshot 1
'M142 0L58 0C53.581699 0 50 3.5817201 50 8L50 50L8 50C3.5817201 50 0 53.581699 0 58L0 142C0 146.418 3.5817201 150 8 150L92 150C96.418297 150 100 146.418 100 142L100 100L142 100C146.418 100 150 96.418297 150 92L150 8C150 3.5817201 146.418 0 142 0ZM100 100L100 58C100 53.581699 96.418297 50 92 50L50 50L50 92C50 96.418297 53.581699 100 58 100L100 100Z'

## Convert stroke to path

> Snapshot 1
'M57.645828 39.75L37.294228 4.5Q34.696152 -2.3841858e-06 29.5 -2.3841858e-06Q24.303848 -2.9057264e-06 21.705772 4.5000029L1.3541732 39.75Q-1.2438966 44.250042 1.3541794 48.750019Q3.9522581 53.25 9.1484098 53.25L49.851601 53.25Q55.047752 53.25 57.645824 48.750015Q60.243893 44.250038 57.645828 39.75ZM29.5 11.000004L48.119549 43.25L10.880453 43.25L29.5 11.000004Z'

## Convert stroke to path 2

> Snapshot 1
'M18.964466 1.4644661L0.46446609 19.964466L7.5355339 27.035534L22.5 12.071068L37.464466 27.035534L44.535534 19.964466L26.035534 1.4644661Q25.948742 1.3776736 25.857796 1.2952443Q25.76685 1.212815 25.671968 1.1349478Q25.577085 1.0570803 25.478497 0.9839623Q25.379906 0.91084433 25.277849 0.84265184Q25.175793 0.77445948 25.070513 0.71135694Q24.965233 0.64825439 24.856983 0.59039366Q24.748732 0.53253293 24.637772 0.48005348Q24.526814 0.42757404 24.413414 0.3806023Q24.300014 0.33363056 24.184444 0.29227966Q24.068878 0.25092876 23.95142 0.21529832Q23.833961 0.17966788 23.714897 0.14984374Q23.595833 0.12001958 23.475449 0.09607359Q23.355064 0.072127596 23.23365 0.054117445Q23.112236 0.036107294 22.990086 0.024076367Q22.867931 0.012045437 22.745337 0.0060227187Q22.622742 0 22.499998 0Q22.377254 0 22.254662 0.0060227187Q22.132067 0.012045437 22.009916 0.024076367Q21.887764 0.036107294 21.76635 0.054117449Q21.644932 0.072127596 21.524548 0.09607359Q21.404163 0.12001958 21.285099 0.14984372Q21.166035 0.17966788 21.048576 0.21529832Q20.931118 0.25092876 20.81555 0.29227966Q20.699982 0.33363056 20.58658 0.3806023Q20.473181 0.42757404 20.362223 0.48005348Q20.251265 0.53253293 20.143015 0.59039366Q20.034763 0.64825439 19.929483 0.71135694Q19.824203 0.77445948 19.722147 0.84265184Q19.62009 0.91084433 19.521502 0.9839623Q19.422913 1.0570803 19.328033 1.1349478Q19.23315 1.212815 19.142204 1.2952443Q19.051258 1.3776736 18.964466 1.4644661Z'

## StrokeJoin.Round

> Snapshot 1
'M-10 100L-10 0Q-10 -0.24548623 -9.9879551 -0.49067676Q-9.9759102 -0.73586726 -9.951848 -0.98017144Q-9.9277859 -1.2244756 -9.8917646 -1.4673047Q-9.8557444 -1.7101339 -9.8078527 -1.9509032Q-9.7599602 -2.1916723 -9.7003126 -2.4298017Q-9.6406651 -2.6679311 -9.5694036 -2.9028468Q-9.4981422 -3.1377625 -9.4154406 -3.3688984Q-9.3327389 -3.6000345 -9.2387953 -3.8268342Q-9.1448517 -4.0536337 -9.0398932 -4.2755508Q-8.9349346 -4.497468 -8.8192129 -4.7139673Q-8.7034912 -4.9304667 -8.5772867 -5.141027Q-8.4510813 -5.3515878 -8.3146963 -5.5557022Q-8.1783113 -5.7598162 -8.0320759 -5.9569926Q-7.8858395 -6.1541691 -7.7301054 -6.3439331Q-7.5743704 -6.5336962 -7.4095116 -6.7155895Q-7.2446527 -6.8974829 -7.0710678 -7.0710678Q-6.8974829 -7.2446527 -6.7155895 -7.4095111Q-6.5336962 -7.5743694 -6.3439331 -7.7301044Q-6.1541691 -7.8858385 -5.9569926 -8.032074Q-5.7598162 -8.1783104 -5.5557022 -8.3146954Q-5.3515878 -8.4510803 -5.1410275 -8.5772858Q-4.9304667 -8.7034912 -4.7139673 -8.8192129Q-4.497468 -8.9349337 -4.2755508 -9.0398922Q-4.0536337 -9.1448507 -3.8268342 -9.2387943Q-3.6000345 -9.3327389 -3.3688984 -9.4154406Q-3.1377625 -9.4981422 -2.9028468 -9.5694036Q-2.6679311 -9.6406651 -2.4298017 -9.7003126Q-2.1916723 -9.7599602 -1.9509032 -9.8078518Q-1.7101339 -9.8557434 -1.4673047 -9.8917637Q-1.2244756 -9.9277849 -0.98017144 -9.951848Q-0.73586726 -9.9759092 -0.49067676 -9.9879551Q-0.24548623 -10 0 -10L100 -10Q100.24548 -10 100.49068 -9.9879541Q100.73587 -9.9759092 100.98018 -9.951848Q101.22448 -9.9277859 101.4673 -9.8917646Q101.71013 -9.8557444 101.9509 -9.8078527Q102.19167 -9.7599602 102.42979 -9.7003126Q102.66793 -9.6406651 102.90285 -9.5694036Q103.13776 -9.4981422 103.3689 -9.4154406Q103.60002 -9.3327389 103.82682 -9.2387953Q104.05362 -9.1448517 104.27554 -9.0398932Q104.49747 -8.9349346 104.71397 -8.8192129Q104.93047 -8.7034912 105.14102 -8.5772867Q105.35158 -8.4510813 105.55569 -8.3146963Q105.75981 -8.1783113 105.95699 -8.0320759Q106.15417 -7.8858395 106.34393 -7.7301054Q106.53369 -7.5743704 106.71558 -7.4095116Q106.89748 -7.2446527 107.07106 -7.0710678Q107.24464 -6.8974829 107.4095 -6.7155895Q107.57436 -6.5336962 107.7301 -6.3439331Q107.88583 -6.1541691 108.03207 -5.9569926Q108.1783 -5.7598162 108.31468 -5.5557022Q108.45107 -5.3515878 108.57726 -5.1410275Q108.70348 -4.9304667 108.8192 -4.7139673Q108.93492 -4.497468 109.03987 -4.2755508Q109.14484 -4.0536337 109.23878 -3.8268342Q109.33272 -3.6000345 109.41542 -3.3688984Q109.49813 -3.1377625 109.5694 -2.9028468Q109.64066 -2.6679311 109.7003 -2.4298017Q109.75995 -2.1916723 109.80785 -1.9509032Q109.85574 -1.7101339 109.89175 -1.4673047Q109.92778 -1.2244756 109.95184 -0.98017144Q109.97591 -0.73586726 109.98795 -0.49067676Q110 -0.24548623 110 0L110 100Q110 100.24548 109.98795 100.49068Q109.97591 100.73587 109.95185 100.98018Q109.92778 101.22448 109.89176 101.4673Q109.85574 101.71013 109.80785 101.9509Q109.75995 102.19167 109.7003 102.42979Q109.64066 102.66793 109.5694 102.90285Q109.49813 103.13776 109.41543 103.3689Q109.33272 103.60002 109.23878 103.82682Q109.14484 104.05362 109.03987 104.27554Q108.93492 104.49747 108.8192 104.71397Q108.70348 104.93047 108.57726 105.14102Q108.45107 105.35158 108.31468 105.55569Q108.1783 105.75981 108.03207 105.95699Q107.88583 106.15417 107.73009 106.34393Q107.57436 106.53369 107.40951 106.71558Q107.24464 106.89748 107.07106 107.07106Q106.89748 107.24464 106.71558 107.4095Q106.53369 107.57436 106.34393 107.7301Q106.15417 107.88583 105.95699 108.03207Q105.75981 108.1783 105.55569 108.31468Q105.35158 108.45107 105.14102 108.57726Q104.93047 108.70348 104.71396 108.8192Q104.49746 108.93492 104.27554 109.03987Q104.05362 109.14484 103.82682 109.23878Q103.60002 109.33272 103.36888 109.41542Q103.13776 109.49813 102.90285 109.5694Q102.66793 109.64066 102.42979 109.7003Q102.19167 109.75995 101.9509 109.80785Q101.71013 109.85574 101.4673 109.89175Q101.22448 109.92778 100.98018 109.95184Q100.73587 109.97591 100.49068 109.98795Q100.24548 110 100 110L0 110Q-0.24548623 110 -0.49067676 109.98795Q-0.73586726 109.97591 -0.98017144 109.95185Q-1.2244756 109.92778 -1.4673047 109.89176Q-1.7101339 109.85574 -1.9509032 109.80785Q-2.1916723 109.75995 -2.4298017 109.7003Q-2.6679311 109.64066 -2.9028468 109.5694Q-3.1377625 109.49813 -3.3688984 109.41543Q-3.6000345 109.33272 -3.8268342 109.23878Q-4.0536337 109.14484 -4.2755508 109.03987Q-4.497468 108.93492 -4.7139673 108.8192Q-4.9304667 108.70348 -5.141027 108.57726Q-5.3515878 108.45107 -5.5557022 108.31468Q-5.7598162 108.1783 -5.9569926 108.03207Q-6.1541691 107.88583 -6.3439331 107.73009Q-6.5336962 107.57436 -6.7155895 107.40951Q-6.8974829 107.24464 -7.0710678 107.07106Q-7.2446527 106.89748 -7.4095111 106.71558Q-7.5743694 106.53369 -7.7301044 106.34393Q-7.8858385 106.15417 -8.032074 105.95699Q-8.1783104 105.75981 -8.3146954 105.55569Q-8.4510803 105.35158 -8.5772858 105.14102Q-8.7034912 104.93047 -8.8192129 104.71396Q-8.9349337 104.49746 -9.0398922 104.27554Q-9.1448507 104.05362 -9.2387943 103.82682Q-9.3327389 103.60002 -9.4154406 103.36888Q-9.4981422 103.13776 -9.5694036 102.90285Q-9.6406651 102.66793 -9.7003126 102.42979Q-9.7599602 102.19167 -9.8078518 101.9509Q-9.8557434 101.71013 -9.8917637 101.4673Q-9.9277849 101.22448 -9.951848 100.98018Q-9.9759102 100.73587 -9.9879551 100.49068Q-10 100.24548 -10 100ZM10 10L10 90L90 90L90 10L10 10Z'

## trim

> Snapshot 1
Expand Down
Binary file modified __test__/pathkit.spec.ts.snap
Binary file not shown.
Loading

0 comments on commit c6af883

Please sign in to comment.