Skip to content

[skia-sync] Merge upstream chrome/m156 bug fixes - #5687

Merged
mattleibow merged 2 commits into
release/4.156.xfrom
skia-sync/release-4.156.x
Nov 11, 2026
Merged

mattleibow merged 2 commits into
release/4.156.xfrom
skia-sync/release-4.156.x

Conversation

@mattleibow

Copy link
Copy Markdown
Contributor

Description

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

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

Related issues

N/A — automated upstream synchronization.

Required skia PR

Requires mono/skia#444

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

Updated the externals/skia gitlink to validated native merge
8c8de9aa05950b0b251924873c361a5441997b54 and recorded upstream chrome/m156 commit
24e65cdd9b6421351dde22acd81dc604bd8073b8 in cgmanifest.json. The release-line package,
assembly, file, and native ABI versions remain unchanged.

Binding regeneration produced no changes or new native functions, so no C# wrapper or test source
changes were required. Component Governance dependency identities and semantic versions remain
unchanged because final DEPS matches the existing fork base.

Testing

  • Native Linux x64 source build: passed (native-build-exit-code.txt = 0).
  • Managed binding build: passed (managed-build-exit-code.txt = 0).
  • Full unfiltered tests/SkiaSharp.Tests.Console.slnx: passed.
    • Core: 6,489 passed, 33 skipped, 0 failed (6,522 total).
    • Gallery: 50 passed, 0 skipped, 0 failed.
    • Singleton initialization: 1 passed, 0 skipped, 0 failed.
    • Vulkan: 23 passed, 2 platform-policy skips, 0 failed.
    • Direct3D: 2 passed, 3 platform-policy skips, 0 failed.

No backend required by Linux GpuPolicy was skipped; required software GPU backends initialized
and executed successfully.

Human review

Review the submodule/Component Governance SHA update and the linked native analysis. Windows,
macOS, Android, WASM, and Tizen native builds were not executed locally and remain for normal CI.
The independent review and its resolved follow-up are included in the automation artifacts.

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-11-11T07:05:27Z

Advance the release/4.156.x Skia submodule to the validated two-parent merge and record the exact upstream m156 commit in Component Governance metadata.

Co-authored-by: Copilot <[email protected]>
@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 Nov 11, 2026
@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 -- 5687

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

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

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #5687

⭐ this PR (full source build) vs 🌙 nightly · 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 — 🔴 36 slower · 🟢 29 faster

  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · Windows · 73.09 µs → 126.72 µs (+73%)
  • 🔴 ColorMathBenchmark.ToColor(Colors: 4096) · Windows · 9.18 µs → 15.78 µs (+72%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 1024) · Windows · 12.66 µs → 20.40 µs (+61%)
  • 🔴 PathBoundsBenchmark.TightBounds(Points: 64) · Windows · 1.19 µs → 1.88 µs (+59%)
  • 🔴 MatrixMapPointsBenchmark.MapPoints(Points: 256) · Windows · 127.1 ns → 193.8 ns (+53%)
  • …and 60 more (see details below)
Full per-OS benchmark deltas

Windows

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 73.09 µs 126.72 µs 🔴 +73%
ColorMathBenchmark.ToColor(Colors: 4096) 9.18 µs 15.78 µs 🔴 +72%
PathBoundsBenchmark.TightBounds(Points: 1024) 12.66 µs 20.40 µs 🔴 +61%
PathBoundsBenchmark.TightBounds(Points: 64) 1.19 µs 1.88 µs 🔴 +59%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 127.1 ns 193.8 ns 🔴 +53%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.57 µs 2.37 µs 🔴 +51%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 193.66 µs 288.37 µs 🔴 +49%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 27.85 µs 41.15 µs 🔴 +48%
CanvasDrawBenchmark.Draw(Shapes: 512) 16.00 ms 23.32 ms 🔴 +46%
CanvasDrawBenchmark.Draw(Shapes: 64) 2.01 ms 2.93 ms 🔴 +46%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.78 µs 2.57 µs 🔴 +44%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 118.39 µs 165.37 µs 🔴 +40%
RuntimeEffectShaderBenchmark.DrawFrame 936.15 µs 1.30 ms 🔴 +39%
ColorParseBenchmark.Parse(Iterations: 1000) 60.27 µs 83.61 µs 🔴 +39%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 7.60 µs 10.34 µs 🔴 +36%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.74 ms 2.32 ms 🔴 +33%
MatrixMapPointsBenchmark.MapVector(Points: 256) 6.64 µs 8.85 µs 🔴 +33%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 8.10 ms 10.69 ms 🔴 +32%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 106.72 µs 140.67 µs 🔴 +32%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 9.80 µs 12.29 µs 🔴 +25%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 762.33 µs 944.89 µs 🔴 +24%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 8.46 ms 10.45 ms 🔴 +24%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 205.82 µs 254.11 µs 🔴 +23%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 274.37 µs 336.94 µs 🔴 +23%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 2.15 ms 2.62 ms 🔴 +22%
…and 9 more

macOS

⏱️ Time (vs 🌙 nightly 4.157.0-nightly.26554.4)

Benchmark baseline this PR Δ
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 108.65 µs 63.12 µs 🟢 -42%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 6.95 µs 4.05 µs 🟢 -42%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 265.12 µs 174.02 µs 🟢 -34%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 3.00 ms 1.97 ms 🟢 -34%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.92 µs 2.56 µs 🔴 +33%
ColorMathBenchmark.ToColor(Colors: 4096) 23.91 µs 16.42 µs 🟢 -31%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 733.81 µs 506.49 µs 🟢 -31%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 215.93 µs 149.69 µs 🟢 -31%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 904.55 µs 627.76 µs 🟢 -31%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 745.63 µs 546.39 µs 🟢 -27%
RuntimeEffectShaderBenchmark.DrawFrame 565.93 µs 428.70 µs 🟢 -24%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.63 ms 1.24 ms 🟢 -24%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.51 ms 4.98 ms 🟢 -23%
ColorMathBenchmark.PreMultiply(Colors: 4096) 9.81 µs 7.56 µs 🟢 -23%
MatrixOpsBenchmark.Invert(Count: 4096) 72.32 µs 55.92 µs 🟢 -23%
ColorParseBenchmark.Parse(Iterations: 1000) 74.81 µs 58.54 µs 🟢 -22%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.75 ms 1.38 ms 🟢 -21%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 161.6 ns 194.6 ns 🔴 +20%
MatrixMapPointsBenchmark.MapRect(Points: 256) 3.62 µs 2.89 µs 🟢 -20%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 8.29 µs 6.85 µs 🟢 -17%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 44.08 µs 36.47 µs 🟢 -17%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.44 µs 1.21 µs 🟢 -16%
PathBoundsBenchmark.TightBounds(Points: 1024) 8.93 µs 7.65 µs 🟢 -14%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 6.02 ms 5.19 ms 🟢 -14%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.29 ms 1.12 ms 🟢 -13%
…and 6 more

📈 Full interactive perf-dashboard & run details →

@mattleibow
mattleibow marked this pull request as ready for review November 11, 2026 17:57
mattleibow added a commit to mono/skia that referenced this pull request Nov 11, 2026
[M156] Fix Ganesh flush tokens, rrects and Graphite clip limits (#444)

Context: mono/SkiaSharp#5687
Changes: d1717dc...8c8de9a

Merge chrome/m156 through 24e65cd into
release/4.156.x, retaining upstream merge ancestry. C API declarations,
dependency pins and generated bindings are unchanged.

~~ Advance Ganesh tokens even when a flush records no draws ~~

Empty flushes could leave per-flush atlas token comparisons stale.
Advance the draw token when GrOpFlushState resets and catch the flush
token up to it, so work scheduled during one flush is not considered
pending by a later flush.

~~ Map rounded-rectangle radii and strokes on the correct axes ~~

Off-diagonal matrix coefficients were mixed between rows when mapping
rrect radii and stroke widths. Correct those transforms, including the
ellipse stroke mapping, and remove the extra quarter-turn swap because
the corrected mapping already produces device-space axes.

Clamp circular and elliptical corner radii to half the transformed
bounds to prevent corner overlap. Document the rect-preserving and
similarity assumptions behind the mapping shortcuts.

~~ Budget Graphite clip draws against render-step capacity ~~

DrawListLayer records clip shapes on first use, but flush checks did not
include clips still needing a draw. Count those elements without
double-counting clips already represented in pendingRenderSteps.

A flush resets clips to undrawn, so a fresh pass must accommodate the
draw and its full effective clip stack. When that cannot fit, warn and
skip the draw instead of recording more render steps than the pass can
hold. Allow capacity assertions to accept a pass exactly at its limit.

DeviceTestClipRenderStepLimits issues repeated draws under accumulating
clip stacks, an oversized single-draw stack and a subsequent normal
draw; it asserts that Recorder::snap still produces a recording.

Co-authored-by: Thomas Smith <[email protected]>
Co-authored-by: Nathan Sanchez <[email protected]>
Co-authored-by: Michael Ludwig <[email protected]>
Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Copilot <[email protected]>
Latest: [M156] Fix Ganesh flush tokens, rrects and Graphite clip limits (#444)
Commit: cb6f6ce6bf3aa7102bbffa49e4b760d948d68918

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mattleibow
mattleibow merged commit ef9ccdd into release/4.156.x Nov 11, 2026
25 of 86 checks passed
@mattleibow
mattleibow deleted the skia-sync/release-4.156.x branch November 11, 2026 19:05
@github-actions github-actions Bot added this to the 4.156.1 milestone Nov 14, 2026
mattleibow pushed a commit that referenced this pull request Nov 17, 2026
[4.155] Backport CVE-2026-126871 and CVE-2026-126882 fixes (#5793)

Context: #5687 (4.156.1 already carries both fixes)
Requires: mono/skia#461

Pin the two m155 Skia security fixes into the 4.155 servicing line for
4.155.2. The submodule and Component Governance hash point to
`168d7202034d`, the squash merge of mono/skia#461. Its tree matches the
reviewed backport head `74a1a34d40`, so repinning did not change the
reviewed code. Keep `upstream_merge_commit` at the last chrome/m155 sync:
these are m156 cherry-picks, not a new m155 upstream merge. No C API,
managed API, or package versions change.

~~ Graphite clip render-step overflow ~~

CVE-2026-126871 (Chromium bug 574218401; M156 fix `160aff2851`):
DrawListLayer recorded clip draws without accounting for pending clip
elements in the draw-pass render-step limit, allowing pipeline data
structures to overflow. Count undrawn clip elements when checking the
limit, retain deferred-clip budgeting when DrawListLayer is disabled,
and skip with a warning when a draw and its full clip stack cannot fit
even in a fresh pass. `DeviceTestClipRenderStepLimits` exercises batches
that require flushing, a pathological clip stack, and a normal draw
after the skipped draw.

~~ Ganesh skewed elliptical rounded-rectangle geometry ~~

CVE-2026-126882 (Chromium bug 578685706; M156 fix `24e65cdd9b`):
Elliptical rounded-rectangle ops used incorrect skew-matrix terms when
mapping radii and stroke widths, producing incorrect geometry under
skew or anisotropic transforms. Use the correct matrix terms and clamp
transformed corner radii to half the mapped bounds to prevent
self-intersections. The m155 cherry-pick applied without conflicts.

Co-authored-by: Ramez Ragaa <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Copilot App <[email protected]>
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