Skip to content

[skia-sync] Merge upstream Skia main (tip)#4289

Closed
mattleibow wants to merge 1 commit into
mainfrom
skia-sync/main
Closed

[skia-sync] Merge upstream Skia main (tip)#4289
mattleibow wants to merge 1 commit into
mainfrom
skia-sync/main

Conversation

@mattleibow

Copy link
Copy Markdown
Collaborator

Automated bleeding-edge sync from the tip of upstream Skia (google/skia main).

Companion skia PR: mono/skia#273

Skia upstream main → mono/SkiaSharp main sync (tip mode)

This PR bumps SkiaSharp's externals/skia submodule to pick up upstream
google/skia main bug fixes (and the m151-in-progress refactor) without
advancing the SkiaSharp milestone or NuGet version.

It is the parent companion of the mono/skia PR for skia-sync/main.

Mode summary

Mode main/tip sync (upstream_ref = main)
Base milestone (current) m150
Target milestone m150 (not a version bump)
Is release-line sync false
Base branch main
Head branch skia-sync/main
Submodule before 280ec21adad7b21bdf8d8081a44c3191bb420fc3 (mono/skia skiasharp HEAD before the merge)
Submodule after cebbc418885bf2d928b31fb3798da45cd31d4a7b (mono/skia skia-sync/main HEAD)
Submodule commits added 3 (merge from upstream + SK_MILESTONE pin + sk_font.cpp include fix)

What changed in the parent repo

File Change
externals/skia Submodule pointer: 280ec21adacebbc41888.
cgmanifest.json upstream_merge_commit: 14d05ec761…cebbc41888…. chrome_milestone stays 150.
native/android/build.cake Added skia_use_partition_alloc=false to the GnNinja call.
native/ios/build.cake Added skia_use_partition_alloc=false.
native/linux/build.cake Added skia_use_partition_alloc=false to both the libSkiaSharp and libHarfBuzzSharp GnNinja calls (the Linux build is the only one that GnNinja-builds HarfBuzz).
native/macos/build.cake Added skia_use_partition_alloc=false.
native/tizen/build.cake Added skia_use_partition_alloc=false.
native/tvos/build.cake Added skia_use_partition_alloc=false.
native/wasm/build.cake Added skia_use_partition_alloc=false to both the libSkiaSharp and libHarfBuzzSharp sections (WASM also GnNinja-builds HarfBuzz).
native/windows/build.cake Added skia_use_partition_alloc=false.

linuxnodeps/build.cake and linux-clang-cross/build.cake were not touched — they
delegate to linux/build.cake. Android/iOS/macOS/tvOS/Windows HarfBuzz are built
via NDK/Xcode/MSBuild rather than GnNinja, so no HarfBuzz-side flag is needed
there.

Why this gn arg is needed: Upstream main added a src/partition_alloc/BUILD.gn
target that pulls a partition_alloc.gni from ${skia_partition_alloc_dir} — a path
our DEPS does not vendor. The default skia_use_partition_alloc = is_clang would
make every clang build pull it in. Forcing the arg to false keeps every clang
platform building against our DEPS-pinned dependencies only. See skill gotcha #23.

Version impact

None. This is explicitly not a version bump:

  • chrome_milestone stays 150.
  • scripts/VERSIONS.txt: skia release m150, libSkiaSharp milestone 150, soname 150.0.0, increment 0 — all unchanged.
  • NuGet package versions: unchanged.
  • The submodule pins SK_MILESTONE to 150 (upstream main has advanced to 151) so the build's git-sync-deps task (which enforces SK_MILESTONE == VERSIONS.txt milestone) still passes.

Bindings (Phase 8)

  • pwsh ./utils/generate.ps1 (via .agents/skills/update-skia/scripts/regenerate-bindings.ps1) ran cleanly.
  • git status after regeneration: no changes to any *.generated.cs file.
  • binding/HarfBuzzSharp/HarfBuzzApi.generated.cs auto-reverted by the script (skill gotcha Surface SKImage.Encode (SKImageEncoder type) #9 — HarfBuzz bindings are out-of-band).
  • Conclusion: no new C API functions were exposed, so no C# wrapper work is required for this sync.

C# changes (Phase 9)

None beyond the items above. C# build:

dotnet build binding/SkiaSharp/SkiaSharp.csproj
Build succeeded. 0 Warning(s) 0 Error(s)

Build & test results (Phase 7 / Phase 10)

Native build (Linux x64):

dotnet cake --target=externals-linux --arch=x64

After adding skia_use_partition_alloc=false (see above), both libraries built cleanly:

  • output/native/linux/x64/libSkiaSharp.so.150.0.0 (~11 MB)
  • output/native/linux/x64/libHarfBuzzSharp.so.0.61421.0 (~2.8 MB)

Runtime deps verified (ldd): libfontconfig, libc++/libc++abi, libunwind, libm,
libc, ld-linux — same shape as before.

Tests (net10.0 | x64 | Linux):

dotnet test tests/SkiaSharp.Tests.Console/SkiaSharp.Tests.Console.csproj
Passed 5584
Failed 0
Skipped 172 (hardware/platform-specific: Metal, Tizen, DirectX, etc.)
Duration 2m 46s

Full test log is uploaded as the test-output.txt workflow artifact.

Items needing human attention

Cross-platform native build verification (HIGH PRIORITY). Only Linux x64 was
actually built in this workflow. The skia_use_partition_alloc=false change was added
to every clang build.cake to keep behavior consistent across platforms, but please
verify on macOS / iOS / tvOS / Android / Windows / WASM / Tizen that the gn arg is
accepted and that the build still produces the expected artifacts before merging.

SK_MILESTONE pin (in the submodule PR). Upstream main has bumped SK_MILESTONE to
151. To honor "tip mode = not a version bump" the submodule PR includes a one-line
fork patch pinning it back to 150. If this sync was intended to actually bump SkiaSharp
to m151, drop that pin in the submodule PR and update VERSIONS.txt, soname (150.0.0
151.0.0), NuGet versions, and chrome_milestone here in the parent PR.

Major upstream header refactor (FYI). Upstream deleted include/private/base/ and
src/base/ directories and moved the headers back to include/private/ and src/core/.
SkiaSharp's C API only referenced one such header (already fixed in the submodule PR).
If you maintain extra native code outside the submodule that includes private Skia
headers directly, you may need to update include paths there.

CG manifest update only — no other CG/security changes. chrome_milestone stayed at
150, so no Skia CVE re-querying is needed for this sync. The upstream_merge_commit
hash bump simply re-points the merge-base used by the security-audit skill.

Verification checklist

  • Submodule pointer matches the head of mono/skia skia-sync/main (cebbc41888).
  • cgmanifest.json upstream_merge_commit matches the submodule HEAD.
  • No *.generated.cs files changed after regeneration.
  • dotnet build binding/SkiaSharp/SkiaSharp.csproj succeeds, 0 warnings.
  • dotnet test tests/SkiaSharp.Tests.Console passes 5584/5584 (172 skipped are hardware-only).
  • scripts/VERSIONS.txt unchanged (milestone, soname, increment).
  • macOS / iOS / tvOS / Android / Windows / WASM / Tizen builds verified after partition_alloc gn arg change. ← Requires human / CI confirmation.

Created by skia-upstream-sync.

Bump the externals/skia submodule from 280ec21ada to cebbc41888,
pulling in ~334 upstream commits from google/skia main since the last
merge base. This is a tip-mode sync — NOT a milestone bump — so
chrome_milestone stays at 150 and VERSIONS.txt/soname are unchanged.

Native build (Phase 7) required a new gn arg, skia_use_partition_alloc=false,
in every clang platform's build.cake because upstream added a
partition_alloc dependency that our DEPS deliberately does not vendor.
Only Linux x64 is built/verified here — the other platforms need
cross-platform human review before merge.

cgmanifest.json upstream_merge_commit updated to the new merge commit.
SkMilestone.h pinned in the submodule to 150 because upstream main has
advanced to 151 (m151 work in progress), but this sync is explicitly
not a version bump.
@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 -- 4289

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4289/packages --name skiasharp-pr-4289
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-4289

@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.

@mattleibow mattleibow closed this Jun 30, 2026
@mattleibow mattleibow deleted the skia-sync/main branch June 30, 2026 16:23
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