Skip to content

[skia-sync] Merge upstream chrome/m148 bug fixes#4262

Merged
mattleibow merged 2 commits into
release/4.148.xfrom
skia-sync/release-4.148.x
Jun 29, 2026
Merged

[skia-sync] Merge upstream chrome/m148 bug fixes#4262
mattleibow merged 2 commits into
release/4.148.xfrom
skia-sync/release-4.148.x

Conversation

@mattleibow

Copy link
Copy Markdown
Collaborator

Automated upstream bug-fix sync for m148. Targeting release branch release/4.148.x (mono/skia release/4.148.x).

Companion skia PR: mono/skia#268

Summary

Release-line bug-fix sync onto release/4.148.x. Bumps the externals/skia submodule pointer to pick up 2 new upstream chrome/m148 bug fixes and updates the matching cgmanifest.json SHAs.

This is not a milestone bump — CURRENT == TARGET == 148. No version files change: scripts/VERSIONS.txt, scripts/azure-templates-variables.yml, SkMilestone.h, SK_C_INCREMENT are all left exactly as they are on release/4.148.x. The only file changes in this PR are:

  • externals/skia submodule pointer: 1a155bae3a6d45d9aed1
  • cgmanifest.json mono/skia commitHash: 1a155bae3ac86db6d3efbd996f00e774b6a7b7226d45d9aed12bacb599261ccebcf4a9764b0467ea
  • cgmanifest.json Skia-core upstream_merge_commit: 54851b68b7a1d49bc4b4361f12786a7d7ad91fff46f2e16555cac1211f4087cf24728fd741ac6495

chrome_milestone stays at 148.

Companion mono/skia PR

mono/skia PR on branch skia-sync/release-4.148.x targeting release/4.148.x. That PR carries the actual upstream merge commit 6d45d9aed1. Per the skill's merge sequence, the mono/skia PR must be merged first; then the parent repo's submodule pointer must be re-pointed at the squashed release/4.148.x SHA before merging this PR.

Upstream commits pulled in (via submodule bump)

SHA Subject Files
46f2e16555 [m148] Resolved a Data Race on fStream in SkTypeface_Mac src/ports/SkTypeface_mac_ct.{cpp,h}
3a90f6662a [graphite] Use stable collection for static bindings src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp

Both are upstream cherry-picks already on chrome/m148. The macOS typeface fix is the user-visible one (eliminates a gTFCache/fStream data race in SkTypeface_Mac); the Graphite change is benign for SkiaSharp because we ship Ganesh, not Graphite/Dawn.

Breaking change analysis

None. Because this is a release-line bug-fix sync (current == target == 148):

  • No public C++ API was added, removed, or renamed by these two commits.
  • No C API (externals/skia/src/c/**, include/c/**) files changed.
  • The binding generator re-ran and reports No changes to bindings (C API signatures unchanged) and No new functions found. binding/SkiaSharp/SkiaApi.generated.cs and the other *Api.generated.cs files are byte-identical to origin/release/4.148.x.
  • No managed C# wrapper changes required.
  • No [Obsolete] markers to add — no deprecations.
  • ABI / soname stay at libSkiaSharp.so.148.0.0.

Version / binding updates

File Change
scripts/VERSIONS.txt unchanged (milestone 148, increment 0, soname 148.0.0)
scripts/azure-templates-variables.yml unchanged
externals/skia/include/core/SkMilestone.h unchanged (SK_MILESTONE 148)
externals/skia/include/c/sk_types.h (SK_C_INCREMENT) unchanged (0)
binding/SkiaSharp/SkiaApi.generated.cs unchanged (regenerated, no diff vs base)
binding/SkiaSharp.Skottie/SkottieApi.generated.cs unchanged
binding/SkiaSharp.SceneGraph/SceneGraphApi.generated.cs unchanged
binding/SkiaSharp.Resources/ResourcesApi.generated.cs unchanged
binding/HarfBuzzSharp/HarfBuzzApi.generated.cs unchanged (HarfBuzz regen is reverted by the regenerate-bindings script per policy)
cgmanifest.json mono/skia commitHash + Skia-core upstream_merge_commit bumped
externals/skia (submodule pointer) bumped to 6d45d9aed1

C# changes

None required. No managed code was modified, no test code was modified.

Build / test results (Linux x64)

The agent used dotnet cake --target=externals-linux --arch=x64 (NOT externals-download, per the skill's hard rule for milestone-touching work). Other platforms (macOS, Windows, iOS, Android, WASM) will rebuild on the release-line CI pipelines once both PRs land.

Stage Result
dotnet tool restore ✅ all tools restored
git submodule status ✅ aligned to base before merge
Upstream merge (in submodule) ✅ clean, no conflicts, git diff --check empty
cgmanifest.json edit
dotnet cake --target=externals-linux --arch=x64 ✅ produced output/native/linux/x64/libSkiaSharp.so.148.0.0 (11.3 MB) and libHarfBuzzSharp.so.0.61420.0 (3.0 MB) — total native build ≈ 16 min
regenerate-bindings.ps1 No changes to bindings, No new functions found, HarfBuzz revert applied
dotnet build binding/SkiaSharp/SkiaSharp.csproj ✅ 0 errors, 0 warnings, all TFMs (net462/net48/netstandard2.0/2.1/net6.0/net9.0/net9.0-android35.0/net10.0/net10.0-android36.0)
Smoke tests (Category=Smoke) ✅ 32 passed, 0 failed, 0 skipped (131 ms)
Full test suite 5544 passed, 0 failed, 172 skipped (HW-dependent), 5716 total — 2 m 32 s

The full suite was first attempted with xUnit's default parallel test execution and crashed in test discovery with PAL_SEHException: Out of memory on the 16 GB CI runner. Re-running with xUnit.MaxParallelThreads=1 xUnit.ParallelizeTestCollections=false (serial execution) completed cleanly with 0 failures. This is an environmental constraint of this CI runner, not a regression introduced by the merge.

Items needing human attention

  • Cross-platform reviewers, please double-check the macOS native build picks up the new SkTypeface_mac_ct.cpp mutex correctly on the release/4.148.x macOS / iOS / Mac Catalyst pipelines. The change is upstream-mainline and small (8 line diff), so risk is low, but the agent only built Linux x64 here.
  • Merge sequence (from the skill, repeated for the human merger):
    1. Merge the mono/skia skia-sync/release-4.148.xrelease/4.148.x PR first (squash).
    2. In this repo, git -C externals/skia fetch origin && git -C externals/skia checkout <new-squashed-sha-on-release/4.148.x>, commit, push to this PR branch.
    3. Re-run CI; merge this PR last.
      Skipping step 2 would orphan the submodule onto the unsquashed branch commit.
  • No native-build dependency issues, no gn arg changes, no compiler/linker flag changes were required for this sync.

Created by skia-upstream-sync.

Pulls 2 upstream bug fixes onto release/4.148.x:

- 46f2e16555 [m148] Resolved a Data Race on fStream in SkTypeface_Mac
- 3a90f6662a [graphite] Use stable collection for static bindings

Submodule bump only. No version/milestone changes (release-line sync,
current == target == m148), no C API changes, no binding regeneration
delta, no behavioural changes for non-macOS/non-Graphite users.

cgmanifest.json updated:
- mono/skia commitHash:        1a155bae3a -> 6d45d9aed1
- upstream_merge_commit:       54851b68b7 -> 46f2e16555 (chrome/m148 HEAD)
- chrome_milestone:            148 (unchanged)

Build / test results (Linux x64):
- Native build: libSkiaSharp.so.148.0.0 produced successfully
- C# build:     0 errors, 0 warnings
- Smoke tests:  32/32 passed
- Full tests:   5544 passed, 0 failed, 172 skipped (HW-dependent)

Companion mono/skia PR on branch skia-sync/release-4.148.x.

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 -- 4262

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

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

Point externals/skia at 9bf10f9f, the merge of the skia-sync/release-4.148.x
upstream chrome/m148 bug fixes into the release/4.148.x branch (mono/skia#268),
instead of the interim skia-sync branch commit (6d45d9aed). cgmanifest.json is
updated to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow
mattleibow marked this pull request as ready for review June 29, 2026 15:05
@mattleibow
mattleibow merged commit c45ace5 into release/4.148.x Jun 29, 2026
1 of 2 checks passed
@mattleibow
mattleibow deleted the skia-sync/release-4.148.x branch June 29, 2026 15:08
@mattleibow mattleibow added the type/milestone-sync Any Skia upstream sync PR (milestone bump, same-milestone bug-fix re-sync, or tip sync). label Jul 3, 2026
@mattleibow mattleibow added the partner/agentic-workflows Issues and PRs created by SkiaSharp agentic workflows. label Jul 11, 2026
mattleibow added a commit that referenced this pull request Jul 12, 2026
#4410)

Fix release-notes classifier that mis-tagged skia-sync PRs as internal (#4410)

The release-notes generator (scripts/infra/docs/release-notes-data.py) tags every
merged PR product / mixed / internal by the files it touched, so the Polish phase
can focus on product changes. Automated [skia-sync] submodule bumps — which change
the shipped native Skia — kept coming out `internal` and being dropped from the
notes (e.g. #4382 in 4.151.0-unreleased and #4262 in 4.148.1-unreleased were tagged
internal despite both bumping externals/skia).

~~ Root cause ~~

_files_by_commit() runs `git log --format=%x1e%H --name-only` and parsed each
record by matching a leading \x1e per line. But run() returns stdout.strip(), and
\x1e (the record separator) is whitespace to Python's str.strip(), so the leading
\x1e on the first record was stripped off. git log lists commits newest-first, so
that first, separator-less record is the newest commit in the range — very often
the latest [skia-sync] bump. The startswith("\x1e") check then missed it, its file
list was dropped, and an empty file set falls through to `internal`.

Parse by splitting on \x1e instead, which recovers every record regardless of the
stripped leading separator.

~~ Sharpen the path tiers ~~

While auditing which paths count as what:

  * product stays the strong signal — binding/ + source/ (managed API & Views) and
    externals/skia (the native Skia submodule, with its vendored HarfBuzz). The
    prefix is exact `externals/skia`, not `externals/`, so it no longer sweeps in
    the sibling externals/depot_tools build toolchain or externals/.gitignore.
  * native/ (per-platform build config) shapes the shipped binaries, so it is not
    internal, but a native/-only PR is usually infra rather than an API/behaviour
    change — so it is `mixed` (Polish judges from the title). Covers the shipped
    WinUI native subtree under native/winui/ too.
  * docs (the mono/SkiaSharp-API-docs submodule, mdoc XML that ships as IntelliSense
    docs) moves up from internal to `mixed`. A bump appears in the parent as the
    bare `docs` gitlink, so the prefix is slash-less and does not collide with
    documentation/ (the docs site, which stays internal).

~~ Make the mapping data-driven ~~

The path→tag mapping is no longer hardcoded in the script. It lives in the committed
scripts/infra/docs/release-notes-paths.json — ordered tiers (tag + patterns) plus a
default — the single deterministic place to edit it. _pr_category loads the tiers
(cached) and returns the first tier with a matching file, else the default. Patterns
match by prefix (str.startswith, unchanged behaviour) or, when they contain a glob
metacharacter (* ? [), by fnmatch.fnmatchcase — so paths, prefixes, and wildcards
are all supported. A missing/malformed config is a hard error, never a silent
fallback to a guessed mapping.

Behaviour is identical to the previous hardcoded tuples, verified across the prefix
cases and the real sync/docs/depot_tools PRs. Committed data.json files self-correct
as pages regenerate on the next prepare run; no data.json format bump. The behaviour
spec (documentation/dev/release-notes-and-api-diffs.md) and the release-notes SKILL.md
are updated to match, including the new config file in the inventory.

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

partner/agentic-workflows Issues and PRs created by SkiaSharp agentic workflows. type/milestone-sync Any Skia upstream sync PR (milestone bump, same-milestone bug-fix re-sync, or tip sync).

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant