Skip to content

[skia-sync] Update skia to milestone 151#4294

Merged
mattleibow merged 4 commits into
mainfrom
skia-sync/m151
Jun 30, 2026
Merged

[skia-sync] Update skia to milestone 151#4294
mattleibow merged 4 commits into
mainfrom
skia-sync/m151

Conversation

@mattleibow

Copy link
Copy Markdown
Collaborator

Automated Skia milestone bump from m150 to m151.

Companion skia PR: mono/skia#274

Update Skia to milestone 151 (m150 → m151)

Summary

Bumps the bundled Skia fork from chrome/m150 to chrome/m151 and SkiaSharp from 4.150.0 to 4.151.0.

  • Submodule: externals/skia advances from b16789ec352c… to a2147f95b91d… (parent commit hash recorded in cgmanifest.json).
  • Submodule branch: skia-sync/m151 (327 upstream commits merged + 1 C API fix).
  • Milestone: 150 → 151. soname: libSkiaSharp.so.150.0.0libSkiaSharp.so.151.0.0. NuGet: 4.150.0 → 4.151.0.
  • SK_C_INCREMENT: unchanged at 0 (milestone change resets the increment).
  • HarfBuzz soname: unchanged (HarfBuzz was not bumped in this sync).

Breaking change analysis

Area Status
C API surface (include/c/*.h, src/c/*.cpp) No additions, no removals, no signature changes — verified by regenerate-bindings.ps1 producing zero diffs in SkiaApi.generated.cs (or any other generated binding).
C++ Skia upstream include/private/base/* headers flattened to include/private/* (the private/base/ subdirectory is gone in m151). Only one of our C API files referenced this path; fix applied in the submodule.
ABI Stable for managed callers — no SkiaSharp public-API changes were needed; no SkiaApi.generated.cs deltas.
Threading / disposal patterns No changes.

There are no managed (C#) source changes in this PR.

Version / binding updates

File Change
cgmanifest.json chrome_milestone 150→151, commitHash updated to submodule HEAD, upstream_merge_commit updated to upstream m151 tip.
scripts/VERSIONS.txt skia release m150→m151, libSkiaSharp milestone 150→151, libSkiaSharp soname 150.0.0151.0.0, all SkiaSharp* NuGet entries bumped to 4.151.0, SkiaSharp assembly/file version bumped to 4.151.0.0.
scripts/azure-templates-variables.yml SKIASHARP_VERSION → 4.151.0.
externals/skia Submodule pointer updated.
binding/SkiaSharp/SkiaApi.generated.cs and friends Regenerated. No diffs.

Native build changes (cross-platform — please review)

Added skia_use_partition_alloc=false to the gn args in every clang platform's native/**/build.cake:

  • native/linux/build.cake — both libSkiaSharp and libHarfBuzzSharp GnNinja calls.
  • native/wasm/build.cake — both libSkiaSharp and libHarfBuzzSharp GnNinja calls.
  • native/macos/build.cake, native/tvos/build.cake, native/ios/build.cake, native/windows/build.cake, native/tizen/build.cake, native/android/build.cakelibSkiaSharp GnNinja calls only (HarfBuzzSharp on these platforms uses xcodebuild / msbuild / ndk-build / tizen, not gn).

Why: m151 introduced src/partition_alloc/, whose BUILD.gn by default tries to import ${skia_partition_alloc_dir}/partition_alloc.gni. Our DEPS does not vendor partition_alloc (it stays commented out), so we explicitly opt into the noop fallback shipped in src/partition_alloc/noop/. The default value of skia_use_partition_alloc is is_clang, which evaluates to true for every platform we ship, so the override is required. Per .agents/skills/update-skia/references/known-gotchas.md #23, the arg lives in build.cake rather than being passed via --gnArgs.

Build & test results

This automated workflow only built Linux x64:

  • dotnet cake --target=externals-linux --arch=x64 → built libSkiaSharp.so.151.0.0 (10.8 MB) and libHarfBuzzSharp.so.0.61421.0 (2.7 MB) successfully.
  • dotnet build binding/SkiaSharp/SkiaSharp.csproj → 0 errors, 0 warnings.
  • pwsh ./utils/generate.ps1 (via regenerate-bindings.ps1) → no binding diffs.
  • dotnet test tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj5,584 passed, 0 failed, 172 skipped (skips are pre-existing GPU/headless related). Full log uploaded as test-output.txt artifact.

Items needing human attention

  • Cross-platform native build verification. Only Linux x64 was built here. Please confirm that the skia_use_partition_alloc=false gn arg works correctly on Windows, macOS, iOS, tvOS, Android, Tizen, and WASM CI builds before merging — this is the primary risk of this sync.
  • DEPS manual merge in the submodule PR preserves our pinned versions for everything tracked in cgmanifest.json. Worth a quick eye over mono/skia#skia-sync/m151 to confirm no required upstream dep was accidentally dropped.
  • Submodule companion PR in mono/skia carries the merge + the sk_font.cpp include-path fix and must merge first (or at the same time) — the parent commit pins the submodule to that branch's HEAD.

Created by skia-upstream-sync.

Merge upstream chrome/m151 into our Skia fork and bump SkiaSharp from
4.150.0 to 4.151.0.

Submodule changes (mono/skia):
- Merge upstream/chrome/m151 (326 upstream commits)
- Fix C API include path: include/private/base/SkTemplates.h ->
  include/private/SkTemplates.h (upstream flattened private/base/ in m151)

Parent repo changes (mono/SkiaSharp):
- Bump cgmanifest.json (chrome_milestone, commitHash, upstream_merge_commit)
- Bump scripts/VERSIONS.txt (milestone, soname, nuget versions)
- Bump scripts/azure-templates-variables.yml (SKIASHARP_VERSION = 4.151.0)
- Add skia_use_partition_alloc=false to native/**/build.cake gn args for
  all clang platforms (linux, wasm, macos, tvos, windows, tizen, android, ios).
  m151 introduced src/partition_alloc/ which defaults to importing
  third_party/externals/partition_alloc/partition_alloc.gni. Our DEPS does
  not vendor partition_alloc, so we use the noop fallback in
  src/partition_alloc/noop/. Applied to both SkiaSharp and HarfBuzzSharp
  GnNinja calls in linux and wasm (other platforms use platform-native
  build systems for HarfBuzzSharp). Per known-gotchas.md #23, this lives
  in build.cake rather than ADDITIONAL_GN_ARGS so it ships consistently.

C# binding regeneration produced no diffs (C API signatures unchanged).
All 5584 tests pass on Linux x64.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4294

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4294"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4294/packages --name skiasharp-pr-4294
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4294

@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

The documentation for this PR has been deployed and is available at:

🔗 View Staging Site
🔗 View Staging Docs
🔗 View Staging Gallery (Blazor)
🔗 View Staging Gallery (Uno Platform)
🔗 View Staging SkiaFiddle

This preview will be updated automatically when you push new commits to this PR.


This comment is automatically updated by the documentation staging workflow.

Picks up the mono/skia fix commit that restores upstream m151's cq_config
blocks on the CanvasKit WASM CI jobs (infra/bots/jobs.json + tasks.json) and
drops the stale commented-out microhttpd DEPS entry. No effect on SkiaSharp's
shipped output; only reduces benign fork divergence from upstream.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mattleibow added a commit to mono/skia that referenced this pull request Jun 30, 2026
[skia-sync] Merge upstream chrome/m151 (#274)

Context: https://skia.googlesource.com/skia/+log/chrome/m151
Changes: skiasharp...skia-sync/m151
Companion: mono/SkiaSharp#4294

Advance the SkiaSharp fork's Skia engine from Chrome milestone 150 to 151 by
merging upstream chrome/m151 (tip 79e2e15) into skia-sync/m151 on top of the
fork's skiasharp branch (280ec21). Merge commit a2147f9 resolved 7
conflicts; the fork's intentional deltas were preserved while taking upstream's
behavior everywhere the fork had no opinion. Final HEAD 68e1c7f is what the
companion SkiaSharp PR #4294 re-pins the submodule to.

This is a clean milestone bump: no new C API functions, SK_C_INCREMENT stays 0,
and parent-repo binding regeneration produced no diffs. All four generated
P/Invoke files regenerate byte-identically.

~~ Conflict resolutions ~~

  * DEPS: manually merged. Took upstream's new infra_revision; kept the fork's
    pinned native deps (libpng, expat, harfbuzz, libjpeg-turbo, freetype, zlib,
    brotli, libwebp, vulkanmemoryallocator, vulkan-headers) so the merge does
    not downgrade our security/bug-fix bumps. Only infra_revision and unused
    commented-out dep revisions moved.
  * bazel/external/dawn/dawn_files.bzl: upstream deleted the file (git rm); not
    used by our build.
  * Five GPU/font files taken --theirs because the fork's M150 backport is now
    upstream in m151, so no fork patch had to be re-applied:
      - src/gpu/ganesh/ops/AtlasTextOp.cpp           (86bafa2 -> 95dbfa2)
      - src/gpu/ganesh/ops/StrokeTessellateOp.cpp    (fd9c3a7 -> dcf3ebf)
      - src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp (9f330f1 -> 6a4be3a)
      - src/gpu/graphite/render/SDFTextLCDRenderStep.cpp (68a31eb -> a145861)
      - src/ports/SkTypeface_mac_ct.h                (14d05ec -> ba3ee9b)

A verify-upstream-or-reapply audit confirmed all five M150 backports we carried
are upstreamed in m151, the src/c and include/c shim directories are intact, and
every conflict was classified individually (no silent --theirs/--ours sweep).

~~ Fork patches carried on top of the merge ~~

  * 3c234da — Fix the SkTemplates.h include path in src/c/sk_font.cpp. m151
    flattened include/private/base/* into include/private/* and removed the
    private/base/ subdirectory, so the shim now includes
    include/private/SkTemplates.h. This is the only hand-written interop change
    in the update.
  * 68e1c7f — Sync infra/bots CI config and DEPS to upstream m151.

~~ Companion-side build note (skia_use_partition_alloc) ~~

m151 introduced src/partition_alloc/, which by default imports
third_party/externals/partition_alloc/partition_alloc.gni. Our DEPS deliberately
does not vendor partition_alloc, so the companion PR adds
skia_use_partition_alloc=false to every clang platform's native build.cake,
falling back to the bundled src/partition_alloc/noop/ headers. The flag is
applied to both the SkiaSharp and HarfBuzzSharp GnNinja invocations on linux and
wasm, and once each on the platforms where HarfBuzzSharp builds via
XCodeBuild/MSBuild/ndk.

These are toolchain/integration changes only — no change to Skia rendering
behavior on any platform. Azure DevOps "SkiaSharp (Public)" build 158552 on the
companion PR is green across all stages (native Windows/macOS/Linux/WASM/Tizen,
package, API diff, managed build, tests, samples).

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PR mono/skia#274 ([skia-sync] Merge upstream chrome/m151) has merged into
the skiasharp branch as merge commit 5209f4a49b55. Re-pin the submodule from
the pre-merge PR head (68e1c7fe3c90) to the merged tip and update the
cgmanifest 'Main Skia repository reference' commitHash to match, so Component
Governance scans the commit that is actually vendored.

The merged tip's tree is identical to 68e1c7fe3c90 (the merge brought in
nothing beyond the PR head), so no source content changes. Version numbers in
scripts/VERSIONS.txt were already bumped to m151 / soname 151.0.0 /
assembly+nuget 4.151.0 (C API increment stays 0), and the cgmanifest CVE entry
already tracks chrome_milestone 151 / upstream 79e2e1538e.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…iew 4.151)

Move the hand-maintained 'support' block in scripts/infra/docs/versions.json
to track where we ship now that main advances to m151:

  stable:  4.148 -> 4.148 + 4.150
  preview: 4.150 -> 4.151

Per Google's schedule, Chrome Stable briefly rolled back to m149 while m150
promotes. We keep 4.148 listed as stable because it remains Chrome
Extended-stable for a few more days, and add 4.150 (our RC line, going stable
imminently). 4.151 becomes the in-flight preview. Drop 4.148 once Google
retires its extended-stable channel.

This block is read only by the release-notes TOC/index grouping and the
security-audit drift check; it is curated by hand on each release and is not
auto-derived from Chromium Dash.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow marked this pull request as ready for review June 30, 2026 23:18
@mattleibow mattleibow merged commit 7b3caff into main Jun 30, 2026
3 of 4 checks passed
@mattleibow mattleibow deleted the skia-sync/m151 branch June 30, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant