Repository navigation
[skia-sync] Update skia to milestone 148 - #4125
Merged
Merged
Conversation
Updates the externals/skia submodule to chrome/m148 and adapts SkiaSharp: - Bump milestone to 148 across VERSIONS.txt and cgmanifest.json (increment 0) - Regenerate SkiaApi.generated.cs: SKColorTypeNative gains R16Float and renumbers subsequent values to match the m148 SkColorType enum - Expose the new color type as public SKColorType.RedF16 (additive, ABI-safe) with byte-size, bit-shift, alpha-type, native and GL-format mappings - Add enum-mapping test coverage for the RedF16 <-> R16Float name mismatch Companion submodule PR: mono/skia#250 Co-authored-by: Copilot <[email protected]>
Contributor
📦 Try the packages from this PRWarning 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 -- 4125PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4125"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4125/packages --name skiasharp-pr-4125More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4125 |
Advance the externals/skia submodule to include the restored Mac Catalyst Apple toolchain selection (mono/skia: e238c61a97), and point cgmanifest.json at the same commit. The upstream m148 toolchain refactor caused Mac Catalyst to use the Linux archiver/linker path; the submodule commit restores the Apple (libtool / -install_name / .dylib) behavior so the maccatalyst framework builds. Co-authored-by: Copilot <[email protected]>
Bump skia submodule to 28dddae371 which skips in-tree emsdk activation when using an external emsdk (the activate action added in m148). m148 also changed the wasm static-lib output extension from .a.wasm to .wasm.a. Adapt native/wasm/build.cake to the new upstream naming (glob *.wasm.a for the merge step and copy libHarfBuzzSharp.wasm.a) rather than patching the upstream toolchain, keeping the submodule closer to vanilla Skia. Co-authored-by: Copilot <[email protected]>
Contributor
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
Updates externals/skia to da8c325ec3, which restores the :fontmgr_fontconfig dependency on :core so SkiaSharp's C API sees SK_FONTMGR_FONTCONFIG_AVAILABLE on Linux. Fixes 244 Linux font-test failures (empty default font manager) introduced by the m148 merge. Co-authored-by: Copilot <[email protected]>
Pull the externals/skia branch up to the current upstream/chrome/m148 tip (a48e9118d9), which advanced two commits past our original merge point with post-cut bug fixes: * a48e9118d9 [m148] Reject Slugs that have creationMatrix with perspective * 3646e4efab Turn off LCD in SDF slugs when downscaling too far These touch AtlasTextOp.cpp, SDFTextLCDRenderStep.cpp, SubRunContainer.cpp, and SlugTest.cpp. We previously matched the milestone cut exactly; absorbing these keeps us current with the m148 branch and clears false-positive 'upstream divergence' flags in the skia-update review (which diffs against the live milestone tip). Updates cgmanifest commitHash to 92dfce6a68 and upstream_merge_commit to a48e9118d9. Co-authored-by: Copilot <[email protected]>
The orchestrator synced Skia's third-party DEPS (harfbuzz, freetype, etc.)
with 'dotnet cake --target=git-sync-deps' run from the repo root. That target
is only defined in scripts/infra/native/shared/native-shared.cake, which is
#load-ed exclusively by the per-platform native/*/build.cake files — never by
the root build.cake. From the repo root the target does not exist, so the step
failed with:
Error: The target 'git-sync-deps' was not found.
This was latent: earlier runs happened to die first at the 'working tree dirty'
pre-flight check (a dirty externals/depot_tools submodule), so the deps step
was never reached until now.
Call Skia's tools/git-sync-deps directly from the submodule instead. The cake
wrapper's only added behavior was a milestone/increment version check (already
covered by the orchestrator's Phase 1 milestone validation); the emsdk
activation step is a no-op for this fork because the in-tree emsdk is not
fetched by DEPS, so bin/activate-emsdk returns early.
Co-authored-by: Copilot <[email protected]>
The git-sync-deps cake task set GIT_SYNC_DEPS_SKIP_EMSDK=1 to avoid the activate-emsdk step that upstream added to tools/git-sync-deps in m121+. That env var was a workaround from before the fork patched bin/activate-emsdk (skia commit 28dddae371) to return early when there is no in-tree emsdk. Since this fork comments out emsdk in DEPS and builds WASM against an external, pre-activated emsdk (skia_emsdk_dir), third_party/externals/emsdk is never fetched, so bin/activate-emsdk is already a guaranteed no-op for every caller. The env var is therefore redundant. Drop it from native-shared.cake and update the update-skia known-gotchas reference accordingly. Verified: 'dotnet cake native/macos/build.cake --target=git-sync-deps' and a direct 'python3 tools/git-sync-deps' both complete cleanly (exit 0) without the env var. Co-authored-by: Copilot <[email protected]>
Advance externals/skia to the current upstream/chrome/m148 tip (54851b68b7), one commit past our previous merge point: * 54851b68b7 [m148] Avoid improper mask formats for SDFT runs Touches SubRunContainer.cpp and SlugTest.cpp. Keeps the fork level with the m148 branch and clears the corresponding 'upstream divergence' flags in the skia-update review (which diffs against the live milestone tip). Updates cgmanifest commitHash to 641164ea1c and upstream_merge_commit to 54851b68b7. Co-authored-by: Copilot <[email protected]>
Picks up the submodule change that syncs modules/skcms/version.sha1 to the upstream chrome/m148 value (92c79500bad2). The vendored skcms source was already identical; this only corrects the recorded provenance revision that had drifted to an older main-lineage autoroll value during the milestone merge. Updates cgmanifest commitHash to 0baca362ab; upstream_merge_commit is unchanged (still 54851b68b7, the last upstream tip merged). Co-authored-by: Copilot <[email protected]>
Picks up the submodule cleanup that deletes the duplicate relnotes/event_tracer_leaking.md (its content already lives in RELEASE_NOTES.md), aligning relnotes/ with upstream chrome/m148. Updates cgmanifest commitHash to 54e5d913d6; upstream_merge_commit unchanged (54851b68b7). Co-authored-by: Copilot <[email protected]>
mattleibow
added a commit
to mono/skia
that referenced
this pull request
Jun 10, 2026
[skia] Merge upstream chrome/m148 (#250) Changes: google/skia@4c9e500...54851b6 Companion: mono/SkiaSharp#4125 Advance the `skiasharp` fork from Google Skia m147 (4c9e500) to the m148 release branch. This is a two-parent merge against upstream `chrome/m148` (tip 54851b6) so upstream `git blame` attribution is preserved. The branch was re-merged to the moving m148 tip twice during review (92dfce6, 641164e) to stay level with late cherry-picks (Slug/SDFT mask-format fixes); only those merges touch the affected upstream files. ~~ Breaking changes (m147 -> m148) ~~ Only one upstream change reaches our C API shim: * kR16_float_SkColorType was inserted mid-enum in SkColorType.h (after kA16_float), renumbering every subsequent value. Mirrored in the C API as R16_FLOAT_SK_COLORTYPE in sk_colortype_t, pinned with a static_assert in sk_enums.cpp so future enum drift fails the build. Validated as no C API impact: SkEventTracer (leakTracer removed, new onExit() — m148 now leaks the tracer, matching our prior fork patch, so we took upstream), SkImages::WrapTexture losing its SkColorType arg (we use Borrow/AdoptTextureFrom), mock calls moving to GrMockBackendSurface.h, and the additive SkDeserialProcs / SkBitmap private-field changes. ~~ Fork patches carried on top of the merge ~~ * Add R16_FLOAT_SK_COLORTYPE to the C API (48aab63). * Restore the Mac Catalyst Apple toolchain clobbered by the merge (e238c61). * Restore the fontconfig fontmgr dependency the SkiaSharp C API needs on Linux — re-guarded under skia_enable_fontmgr_fontconfig in the core source_set (da8c325). * Make in-tree emsdk activation a no-op when the external emsdk is in use, so tools/git-sync-deps no longer needs GIT_SYNC_DEPS_SKIP_EMSDK (28dddae). ~~ Conflict / divergence cleanup ~~ * Kept ours (fork-managed pins): DEPS, third_party/harfbuzz/BUILD.gn. * Took upstream: RELEASE_NOTES.md, infra/bots/tasks.json, SkEventTracer.{h,cpp}, src/gpu/graphite/mtl/MtlCaps.mm. * modules/skcms/version.sha1: realigned to upstream m148 (92c79500) — the merge had kept our stale main-lineage value (24b120). The vendored skcms source is byte-identical either way; version.sha1 is only an autoroll provenance marker, so this just removes confusing metadata drift (0baca36). * Removed relnotes/event_tracer_leaking.md — upstream consolidated the standalone relnotes into RELEASE_NOTES.md (fe2718d) and our merge kept a stale duplicate; the content is preserved verbatim there (54e5d91). Companion SkiaSharp PR #4125 is green across the full CI matrix (AzDO build 158159, 82/82 jobs). Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot <[email protected]>
PR mono/skia#250 ([skia] Merge upstream chrome/m148) merged into the skiasharp branch as 1a155bae3a. Point the submodule at that merge commit and update cgmanifest.json accordingly. Tree content is identical to the previous fork tip (54e5d913d6); this just moves the pointer onto the merged, blessed skiasharp history. upstream_merge_commit is unchanged (54851b68b7) — no new upstream code. Co-authored-by: Copilot <[email protected]>
The m148 binding added kR16_float_SkColorType as public SKColorType.RedF16. That spelled-out 'Red' breaks the enum's convention: the red channel is abbreviated 'R' everywhere else (R8Unorm, R16Unorm, RgF16, Rgba*, Rgb*), and only alpha is ever spelled out (because there is no bare 'A'). The directly analogous sibling is RgF16 (kR16G16_float -> Rg + F16), so the single red-channel float should be RF16. Rename before it ships so the public surface stays consistent. Value (= 28) and the RF16 <-> R16Float native mapping are unchanged, so this is ABI-neutral for the unreleased m148 type. Co-authored-by: Copilot <[email protected]>
mattleibow
marked this pull request as ready for review
June 10, 2026 23:57
Co-authored-by: Copilot <[email protected]>
This was referenced Jun 11, 2026
mattleibow
added a commit
that referenced
this pull request
Jun 11, 2026
Fix SKIASHARP_VERSION yaml missed by the m148 bump (#4144) Context: #4125 Context: #3247 Context: #3574 The m148 milestone bump (#4125) updated every version number in scripts/VERSIONS.txt to 4.148.0 but left scripts/azure-templates-variables.yml at SKIASHARP_VERSION: 4.147.0 — even though that variable's own comment requires it to match the nuget version in VERSIONS.txt. It is a compile-time constant feeding the BUILD_NUMBER counter expression and cannot be derived dynamically, so the stale value silently mismatches the rest of the release. This was not a manual oversight: the update-skia Phase 6 script (.agents/skills/update-skia/scripts/update-versions.ps1) was pointed at a file that no longer exists. #3247 moved SKIASHARP_VERSION out of the deleted scripts/azure-pipelines-variables.yml into scripts/azure-templates-variables.yml (Apr 2025). When the script was authored in #3574 (Mar 2026) it referenced the old, already-deleted filename, and its `Test-Path ... else { skip }` guard made the miss invisible — so the m148 run skipped the file with no error and no gate failure. ~~ The fix ~~ * Bump SKIASHARP_VERSION to 4.148.0 in scripts/azure-templates-variables.yml. * Repoint update-versions.ps1 Step 3 at scripts/azure-templates-variables.yml, replace only the SKIASHARP_VERSION line via a targeted regex, and hard-fail (Write-Error) if the file is missing instead of silently skipping — a future rename now breaks loudly. * Replace the stale-only verification (which merely checked the old milestone number was gone) with a positive assertion that SKIASHARP_VERSION exactly equals the target nuget version. Per GPT-5.5 review the old check would have falsely passed if the value were stuck on a different milestone (e.g. 4.146.0, where the replace is a no-op) or carried a suffix (4.147.0-preview.2 -> 4.148.0-preview.2 no longer contains 147). * Update SKILL.md and references/typical-changes.md to the correct filename. Verified: PowerShell parses clean; simulated the gate against 4.146.0 (fails as expected) and 4.147.0 (passes at 4.148.0). Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot <[email protected]>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the
externals/skiasubmodule to Google Skiachrome/m148, adapts the SkiaSharp bindings, and carries the native-build and tooling fixes needed for a clean cross-platform build.54851b68b7)skiasharpfirst)158159is fully green — 82/82 jobs (native across all platforms, managed builds, full test suite, and NuGet packaging).What changed
Version files
scripts/VERSIONS.txt: milestone → 148, soname/assembly/file/all nuget lines → 4.148.0, increment reset to 0.cgmanifest.json:commitHash,chrome/m148,chrome_milestone: 148,upstream_merge_commit→54851b68b7.C API (submodule, PR #250)
kR16_float_SkColorTypemid-enum (afterkA16_float), renumbering subsequentSkColorTypevalues. Mirrored withR16_FLOAT_SK_COLORTYPEinsk_colortype_t+ astatic_assertinsk_enums.cpp.Bindings
SkiaApi.generated.cs:SKColorTypeNative.R16Float = 21inserted, later values renumbered (name-basedEnumMappingsstay valid).SKColorType.RedF16 = 28(next free value → ABI-safe; existing values unchanged).SKColorTypeswitches:GetBytesPerPixel(2),GetBitShiftPerPixel(1),GetAlphaType(opaque),ToNative/FromNative(↔R16Float),ToGlSizedFormat(R16F).RedF16↔R16Floatname mismatch.Native build fixes
native/wasm/build.cake): m148 emscripten emits archives as*.wasm.a(was*.a.wasm); updated the merge glob and thelibHarfBuzzSharpcopy so the WASM build links again. Builds against the external emsdk (in-tree emsdk stays commented out inDEPS).Tooling / infra cleanup
GIT_SYNC_DEPS_SKIP_EMSDKfromnative-shared.cake. The fork'sbin/activate-emsdkno-op patch already makes activation a guaranteed no-op when the in-tree emsdk is absent, so the env var no longer did anything. Documented inupdate-skia/references/known-gotchas.md.review-skia-updateskill (run_review.py): it calleddotnet cake --target=git-sync-depsfrom the repo root, but that target is only defined in the per-platform native cake files — so it always failed "target not found". Now invokestools/git-sync-depsdirectly from the submodule.Breaking change analysis
Only one m148 change affects our C API (the color-type enum insertion).
SkEventTracer(leakTracer removed / newonExit()),SkImages::WrapTexture, mock calls moving out ofGrBackendSurface.h, and the additiveSkDeserialProcs/SkBitmapprivate changes were validated as having no C API impact. Independently validated — no missed items.Merge order
skiasharp.main.