Skip to content

[skia-sync] Merge upstream chrome/m150#259

Merged
mattleibow merged 4 commits into
skiasharpfrom
skia-sync/m150
Jun 24, 2026
Merged

[skia-sync] Merge upstream chrome/m150#259
mattleibow merged 4 commits into
skiasharpfrom
skia-sync/m150

Conversation

@mattleibow

Copy link
Copy Markdown
Collaborator

Automated upstream merge of chrome/m150.

mono/skia PR Summary: Merge upstream chrome/m150 bug fixes

Overview

Same-milestone sync: merged 1 new upstream cherry-pick into chrome/m150.

Field Value
Branch skia-sync/m150
Target skiasharp
Milestone m150 (same-milestone bug-fix sync)
Submodule SHA 7742707ec7924f172319c471b913e94af1a80c04

Upstream Commits Merged

SHA Title Impact
9f330f1704 [graphite] Use stable collection for static bindings ⚪ Graphite/Dawn only — no C API or Ganesh impact

Commit Details

9f330f1 — [graphite] Use stable collection for static bindings

  • Author: Michael Ludwig (Google)
  • File: src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp
  • Fixes a potential memory corruption in Graphite's Dawn pipeline when a vector grows and invalidates pointers stored in nextInChain.
  • SkiaSharp uses Ganesh (not Graphite): this change has zero impact on SkiaSharp's rendering pipeline.

Breaking Change Analysis

Category Change Risk C API Impact Action
Graphite internal Stable collection for static bindings ⚪ None None No action required

Conflicts Resolved

None — merge was automatic (clean merge).

C API Files Verification

All C API files (include/c/*.h, src/c/*.cpp) are intact and unchanged.

Items Needing Human Attention

None. This is a clean, low-risk bug-fix sync with no impact on the Ganesh backend or C API.

Created by skia-upstream-sync.

lhkbob and others added 2 commits June 15, 2026 09:11
Since the layouts are passed by pointer in the `nextInChain` field,
their addresses need to stay valid until the BindGroupLayout is created.
With vector, if it ever grew, that would not remain the case. Since
there are usually only 0 to 1 immutable samplers, this likely never
happened (and also why it uses a built-in storage for 1).

Also removes the include for vector and uses TArray (we had been mixing
both throughout the file).

Bug: 520514458
Fixed: 523531101
Change-Id: I44c9566c68ab0e6c6d659ea77a423ddc50d53c76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1264157
Reviewed-by: Thomas Smith <thomsmit@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
(cherry picked from commit 6a4be3a)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1266416
Commit-Queue: Thomas Smith <thomsmit@google.com>
Merge single upstream commit:
- 9f330f1 [graphite] Use stable collection for static bindings
  (Graphite/Dawn only change, no C API or Ganesh impact)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow marked this pull request as ready for review June 19, 2026 09:15
alexiscruzdavid and others added 2 commits June 23, 2026 09:07
There was a data race in SkTypeface_Mac where `onOpenStream`
and `onOpenExistingStream` would race to read/write `fStream`. While `onOpenStream` would begin initializing `fStream` on one thread, a separate thread could be calling `onOpenExistingStream` to try to read `fStream` before it was done initializing.

The issue was resolved by applying a mutex on `fStream`.

The cl introducing this bug (https://skia-review.git.corp.google.com/c/skia/+/204720) was focused on caching the typefaces received with a global process wide `gTFCache` to save on performance and memory. The issue arose in that since the SkTypeface_Mac could be accessed across threads, it became thread unsafe.

A test was added to this CL but removed as it was too large and took too long. It helps us keep it in the patch history for reference.

Bug: b/520535595
Bug: 520535595
Fixed: 524508854
Change-Id: Id28aeed3d67a5a5246d22681f2c7ab0e6c133558
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1264296
Commit-Queue: Alexis Cruz-Ayala <alexisdavidc@google.com>
Reviewed-by: Kaylee Lubick <kjlubick@google.com>
(cherry picked from commit ba3ee9b)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1274436
Merge single upstream commit:
- 14d05ec [m150] Resolved a Data Race on fStream in SkTypeface_Mac
  (macOS thread safety fix, no C API or public API impact)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow merged commit f6ee107 into skiasharp Jun 24, 2026
1 check passed
mattleibow added a commit to mono/SkiaSharp that referenced this pull request Jun 24, 2026
Repoint the submodule from the pre-merge feature-branch head
38b9d41d3d to f6ee107ea5, the merge commit of skia PR mono/skia#259
on the skiasharp branch (tree-identical to 38b9d41d3d). Update
cgmanifest.json commitHash to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mattleibow added a commit to mono/SkiaSharp that referenced this pull request Jun 24, 2026
[skia-sync] Update externals/skia to chrome/m150 bug-fix tip (#4190)

Companion skia PR: mono/skia#259
Changes: mono/skia@a54d909...f6ee107

Same-milestone (m150 -> m150) sync that advances the externals/skia
submodule to the latest skiasharp branch tip and updates cgmanifest.json
to match. No SkiaSharp version bump (still 4.150.0) and no C API or binding
changes — regenerated bindings produced no diff, so this is a pure native
update from upstream.

Two upstream chrome/m150 cherry-picks are pulled in:

  * 14d05ec761 [m150] Resolved a Data Race on fStream in SkTypeface_Mac
    Fixes a data race between SkTypeface_Mac::onOpenStream() and
    onOpenExistingStream(), which could read/write the mutable fStream
    member concurrently. Upstream replaces the SkOnce init guard with an
    SkSharedMutex (exclusive on open, shared on existing-stream/clone).
    Relevant to SkiaSharp: the macOS/CoreText port backs SKTypeface on
    Apple platforms, where typefaces are frequently shared across threads.

  * 9f330f1704 [graphite] Use stable collection for static bindings
    Graphite/Dawn-only fix (std::vector -> SkTBlockList/TArray for stable
    sampler-layout addresses). SkiaSharp ships Ganesh, not Graphite/Dawn,
    so this has zero runtime impact and is included only to keep the fork
    in lockstep with upstream m150.

cgmanifest.json: commitHash -> f6ee107ea5, upstream_merge_commit -> 14d05ec761.

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow deleted the skia-sync/m150 branch June 26, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants