diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 6fd5be48..35ee74d8 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -52,11 +52,6 @@ jobs: pip install certifi if: matrix.os == 'windows-latest' - - name: Install tools on Linux - run: | - sudo apt-get install -y ninja-build - if: matrix.os == 'ubuntu-latest' - - name: Install uses: actions-rs/toolchain@v1 with: diff --git a/.gitmodules b/.gitmodules index 86556f57..a4669ba4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "skia"] path = skia url = https://github.com/google/skia.git - branch = chrome/m87 + branch = chrome/m89 [submodule "depot_tools"] path = depot_tools url = https://github.com/rust-skia/depot_tools.git diff --git a/scripts/build-skia.js b/scripts/build-skia.js index 49bb171d..a315ac23 100644 --- a/scripts/build-skia.js +++ b/scripts/build-skia.js @@ -16,21 +16,21 @@ function exec(command) { exec('python ./tools/git-sync-deps') -const CC = platformName === 'win32' ? '\\"clang-cl\\"' : '"clang"' -const CXX = platformName === 'win32' ? '\\"clang-cl\\"' : '"clang++"' +const CC = platformName === 'win32' ? '\\"clang-cl\\"' : platformName === 'linux' ? '"clang-9"' : '"clang"' +const CXX = platformName === 'win32' ? '\\"clang-cl\\"' : platformName === 'linux' ? '"clang++-9"' : '"clang++"' let ExtraCflagsCC = '' let ExtraSkiaBuildFlag = '' switch (platformName) { case 'win32': - ExtraCflagsCC = `\\"/std:c++17\\", \\"/MT\\"` + ExtraCflagsCC = `\\"/std:c++17\\", \\"/MT\\", \\"-DSK_FORCE_RASTER_PIPELINE_BLITTER\\"` ExtraSkiaBuildFlag = 'clang_win=\\"C:\\\\Program Files\\\\LLVM\\"' break case 'linux': - ExtraCflagsCC = '"-stdlib=libstdc++", "-std=c++17", "-fno-rtti", "-fno-exceptions"' - ExtraSkiaBuildFlag = ['skia_use_system_freetype2=false', 'skia_use_fontconfig=false'].join('\n') + ExtraCflagsCC = '"-std=c++17", "-fno-rtti", "-fno-exceptions", "-DSK_FORCE_RASTER_PIPELINE_BLITTER"' + ExtraSkiaBuildFlag = ['skia_use_system_freetype2=false', 'skia_use_fontconfig=false'].join(' ') break case 'darwin': - ExtraCflagsCC = '"-std=c++17", "-fno-rtti", "-fno-exceptions"' + ExtraCflagsCC = '"-std=c++17", "-fno-rtti", "-fno-exceptions", "-DSK_FORCE_RASTER_PIPELINE_BLITTER"' break default: throw new TypeError(`Don't support ${platformName} for now`) diff --git a/skia b/skia index 64fc64c9..15595ea3 160000 --- a/skia +++ b/skia @@ -1 +1 @@ -Subproject commit 64fc64c9483f723dde62f077ed6a91585ec26659 +Subproject commit 15595ea39c4442ded546ba36ef63a521240bc0f4 diff --git a/skia-c/skia_c.cpp b/skia-c/skia_c.cpp index 22890203..d2975d65 100644 --- a/skia-c/skia_c.cpp +++ b/skia-c/skia_c.cpp @@ -674,14 +674,15 @@ extern "C" skiac_transform c_ts, int filter_quality) { - const auto skia_tile_mode = SkTileMode::kRepeat; + auto skia_tile_mode = SkTileMode::kRepeat; const auto ts = conv_from_transform(c_ts); + const auto sampling_options = new SkSamplingOptions((SkFilterQuality)filter_quality); sk_sp image = SURFACE_CAST->makeImageSnapshot(); auto shader = image->makeShader( skia_tile_mode, skia_tile_mode, - &ts, - (SkFilterQuality)filter_quality) + *sampling_options, + &ts) .release(); if (shader)