Skip to content

[skia-sync] Merge upstream chrome/m153 bug fixes - #4927

Merged
mattleibow merged 3 commits into
mainfrom
skia-sync/m153
Sep 3, 2026
Merged

[skia-sync] Merge upstream chrome/m153 bug fixes#4927
mattleibow merged 3 commits into
mainfrom
skia-sync/m153

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Description

Automated upstream bug-fix sync for m153.

This pull request was produced by skia-upstream-sync.

Related issues

N/A — automated upstream synchronization.

Required skia PR

Requires mono/skia#350

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update
  • Views & integrations
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

Advances the externals/skia submodule within milestone 153 to upstream
chrome/m153 @ 4f574af2444846ceca4d277a8095c5d4229d175f (merge commit
d87457da65b27386267485bb10253b5ab9112121), picking up the upstream cherry-pick that
fixes a use-after-free in SkCachedData::internalUnref.

This is a same-milestone bug-fix update (CURRENT == TARGET == 153, upstream ref
chrome/m153): product versions are unchanged; only the Skia hash advances.

  • externals/skia gitlink: ca4e52cb…d87457da… (exact tested commit).
  • cgmanifest.json: Skia commitHash and upstream_merge_commit advanced to the new SHAs; chrome_milestone stays 153.
  • No C API change, so no generated binding change (SkiaApi.generated.cs and all *.generated.cs unchanged); no new native functions.
  • No managed wrapper, dependency, or version-surface changes (update_versions.py gate passed with m153 → m153, no manifest version drift).

Testing

Native build from source (Linux/x64) succeeded; managed SkiaSharp.csproj builds
clean. Full unfiltered tests/SkiaSharp.Tests.Console.slnx (net10.0/x64) passed every
host:

  • SkiaSharp.Tests: Passed 6127, Skipped 33, Failed 0
  • SkiaSharp.Tests.SingletonInit: Passed 1, Failed 0
  • SkiaSharp.Vulkan.Tests: Passed 23, Skipped 2, Failed 0
  • SkiaSharp.Direct3D.Tests: Passed 2, Skipped 3, Failed 0

No GpuPolicy-required backend was skipped (Vulkan/lavapipe executed). Test exit code 0.

Human review

  • Validated only on Linux/x64. Windows, macOS, Android, iOS, and WASM builds/tests were not run locally and require CI/reviewer coverage.
  • Parent gitlink points at the exact mono/skia commit used by the green run; merge the paired mono/skia PR first, then repoint this PR's submodule to the merged skiasharp commit.

Checklist

  • Tests added or updated when behavior required them, or the report explains why not
  • Changes above lists all public API and behavioral changes or states that none changed
  • Documentation follow-up filed, or no public API changed
  • Companion mono/skia PR linked above and bindings regenerated

Last rendered by the sync workflow: 2026-09-03T00:49:16Z

…nalUnref)

Advances the mono/skia submodule within milestone 153 to pick up the
upstream cherry-pick fixing a use-after-free in SkCachedData::internalUnref.
Same-milestone bug-fix update: versions unchanged, only the Skia hash and
cgmanifest upstream_merge_commit advance. No C API, binding, or dependency
changes. Full unfiltered test solution passes on Linux/x64 including the
Vulkan GPU backend.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow added 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). labels Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

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

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

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

@github-actions

github-actions Bot commented Sep 3, 2026

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.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #4927

this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 12 slower · 🟢 73 faster

  • 🔴 RuntimeEffectShaderBenchmark.DrawFrame · Linux · 2.85 ms → 4.19 ms (+47%)
  • 🟢 ColorMathBenchmark.ToColor(Colors: 4096) · Linux · 14.21 µs → 7.61 µs (-46%)
  • 🟢 ColorMathBenchmark.UnPreMultiply(Colors: 4096) · Linux · 11.43 µs → 6.83 µs (-40%)
  • 🟢 ColorMathBenchmark.PreMultiply(Colors: 4096) · Linux · 12.87 µs → 7.79 µs (-39%)
  • 🟢 MatrixMapPointsBenchmark.MapRect(Points: 256) · Linux · 14.67 µs → 9.63 µs (-34%)
  • …and 80 more (see details below)

📦 Allocations — 🔴 1 more alloc · 🟢 0 less alloc

  • 🔴 RuntimeEffectShaderBenchmark.DrawFrame · Linux · 683 B → 730 B (+7%)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
RuntimeEffectShaderBenchmark.DrawFrame 2.85 ms 4.19 ms 🔴 +47%
ColorMathBenchmark.ToColor(Colors: 4096) 14.21 µs 7.61 µs 🟢 -46%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 11.43 µs 6.83 µs 🟢 -40%
ColorMathBenchmark.PreMultiply(Colors: 4096) 12.87 µs 7.79 µs 🟢 -39%
MatrixMapPointsBenchmark.MapRect(Points: 256) 14.67 µs 9.63 µs 🟢 -34%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 73.86 µs 48.72 µs 🟢 -34%
ColorParseBenchmark.Parse(Iterations: 1000) 74.16 µs 50.36 µs 🟢 -32%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.92 ms 2.02 ms 🟢 -31%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.50 µs 3.12 µs 🟢 -31%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 759.12 µs 529.39 µs 🟢 -30%
MatrixOpsBenchmark.Concat(Count: 4096) 221.82 µs 155.81 µs 🟢 -30%
MatrixOpsBenchmark.Invert(Count: 4096) 127.44 µs 90.47 µs 🟢 -29%
PathBoundsBenchmark.TightBounds(Points: 64) 997.5 ns 724.5 ns 🟢 -27%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 14.18 µs 10.30 µs 🟢 -27%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 18.11 ms 23.00 ms 🔴 +27%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 249.92 µs 182.51 µs 🟢 -27%
PathBoundsBenchmark.TightBounds(Points: 1024) 10.52 µs 7.70 µs 🟢 -27%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 352.15 µs 259.36 µs 🟢 -26%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 3.93 ms 4.93 ms 🔴 +26%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.34 ms 1.00 ms 🟢 -25%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 218.98 µs 164.96 µs 🟢 -25%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 946.94 µs 720.71 µs 🟢 -24%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 257.35 µs 195.90 µs 🟢 -24%
MatrixMapPointsBenchmark.MapVector(Points: 256) 10.83 µs 8.37 µs 🟢 -23%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 173.15 µs 134.76 µs 🟢 -22%
…and 7 more

📦 Allocations (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
RuntimeEffectShaderBenchmark.DrawFrame 683 B 730 B 🔴 +7%

Windows

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 2.21 µs 1.65 µs 🟢 -25%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 171.3 ns 134.5 ns 🟢 -22%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 2.11 ms 1.70 ms 🟢 -19%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.71 ms 2.21 ms 🟢 -18%
ColorMathBenchmark.ToColorF(Colors: 4096) 13.34 µs 10.92 µs 🟢 -18%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 12.22 µs 10.01 µs 🟢 -18%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 9.89 ms 8.17 ms 🟢 -17%
ColorMathBenchmark.ToColor(Colors: 4096) 14.96 µs 12.47 µs 🟢 -17%
CanvasDrawBenchmark.Draw(Shapes: 512) 21.28 ms 17.86 ms 🟢 -16%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 733.32 µs 622.09 µs 🟢 -15%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.53 ms 2.18 ms 🟢 -14%
MatrixOpsBenchmark.Concat(Count: 4096) 248.32 µs 215.32 µs 🟢 -13%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 78.76 µs 68.49 µs 🟢 -13%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 245.61 µs 213.66 µs 🟢 -13%
MatrixMapPointsBenchmark.MapVector(Points: 256) 8.19 µs 7.15 µs 🟢 -13%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 131.01 µs 114.69 µs 🟢 -12%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 336.69 µs 294.97 µs 🟢 -12%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.86 ms 2.50 ms 🟢 -12%
ColorParseBenchmark.Parse(Iterations: 1000) 76.43 µs 67.01 µs 🟢 -12%
RuntimeEffectShaderBenchmark.DrawFrame 1.12 ms 984.12 µs 🟢 -12%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 1.26 ms 1.11 ms 🟢 -12%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 10.00 ms 8.86 ms 🟢 -11%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 901.08 µs 798.57 µs 🟢 -11%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 4.74 µs 4.28 µs 🟢 -10%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 98.02 µs 106.75 µs 🔴 +9%
…and 5 more

macOS

⏱️ Time (vs 🌙 nightly 4.152.0-nightly.26431.1)

Benchmark baseline this PR Δ
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 216.97 µs 164.04 µs 🟢 -24%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 661.51 µs 511.93 µs 🟢 -23%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 996.80 µs 801.89 µs 🟢 -20%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.66 ms 2.15 ms 🟢 -19%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 99.39 µs 115.85 µs 🔴 +17%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 5.88 ms 4.93 ms 🟢 -16%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 771.66 µs 652.36 µs 🟢 -15%
RuntimeEffectShaderBenchmark.DrawFrame 515.34 µs 591.86 µs 🔴 +15%
ColorMathBenchmark.ToColor(Colors: 4096) 18.76 µs 16.01 µs 🟢 -15%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.45 ms 1.25 ms 🟢 -14%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 68.39 µs 77.19 µs 🔴 +13%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.65 ms 1.48 ms 🟢 -10%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 53.81 µs 48.26 µs 🟢 -10%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 5.42 ms 5.94 ms 🔴 +10%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 20.06 µs 18.15 µs 🟢 -10%
ColorParseBenchmark.Parse(Iterations: 1000) 61.94 µs 67.79 µs 🔴 +9%
MatrixMapPointsBenchmark.MapVector(Points: 256) 2.85 µs 2.58 µs 🟢 -9%
MatrixOpsBenchmark.Invert(Count: 4096) 66.33 µs 60.89 µs 🟢 -8%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 144.07 µs 154.81 µs 🔴 +7%
MatrixOpsBenchmark.Concat(Count: 4096) 111.40 µs 119.61 µs 🔴 +7%
CanvasDrawBenchmark.Draw(Shapes: 512) 11.55 ms 10.79 ms 🟢 -7%
ColorMathBenchmark.ToColorF(Colors: 4096) 5.29 µs 4.97 µs 🟢 -6%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.84 µs 1.95 µs 🔴 +6%

📈 Full interactive perf-dashboard & run details →

@mattleibow
mattleibow marked this pull request as ready for review September 3, 2026 04:31
mattleibow added a commit to mono/skia that referenced this pull request Sep 3, 2026
[skia-sync] Merge upstream chrome/m153 bug fixes (#350)

Requires: mono/SkiaSharp#4927
Changes: ca4e52c...d87457d

Merge the Chrome M153 use-after-free fix into the SkiaSharp fork.

SkCachedData::internalUnref could delete its owning object before the
AutoMutexWritable guard released the object's mutex. Store the unref result,
destroy the guard, and only then delete the object, preventing the mutex from
being unlocked through freed memory.

The reviewed range changes only src/core/SkCachedData.cpp and requires no fork
conflict resolution. Preserve its two-parent ancestry by selecting
**Create a merge commit**; do not squash or rebase this PR.

Co-authored-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Latest: [skia-sync] Merge upstream chrome/m153 bug fixes (#350)
Commit: 92dc1a61df70e9238e7efe435f40a4136e887df8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mattleibow
mattleibow merged commit f3fdbcc into main Sep 3, 2026
25 of 27 checks passed
@mattleibow
mattleibow deleted the skia-sync/m153 branch September 3, 2026 05:11
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