Skip to content

[skia-sync] Merge upstream chrome/m150 bug fixes - #4517

Merged
mattleibow merged 2 commits into
release/4.150.xfrom
skia-sync/release-4.150.x
Jul 22, 2026
Merged

[skia-sync] Merge upstream chrome/m150 bug fixes#4517
mattleibow merged 2 commits into
release/4.150.xfrom
skia-sync/release-4.150.x

Conversation

@mattleibow

Copy link
Copy Markdown
Collaborator

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

Companion skia PR: mono/skia#290

SkiaSharp — pick up upstream chrome/m150 bug fixes

Release-line bug-fix sync for release/4.150.x. No version bump (milestone stays at m150; increment stays 0).

Companion PR

  • mono/skia: skia-sync/release-4.150.xrelease/4.150.x
  • Submodule bump: 0aa2d542e88f1657daed

Upstream changes

2 Ganesh cherry-picks on chrome/m150 — details in the mono/skia PR summary.
Both are internal GPU dirty-tracking / readback fixes; no public API surface changes.

Breaking change analysis

  • C API diff: 0 additions / 0 removals / 0 signature changes
  • Managed binding regen: not required (no C API changes)
  • ABI: unchanged

Files changed in this repo

File Change
externals/skia Submodule pointer bumped to 8f1657daed
cgmanifest.json Skia commitHash + upstream_merge_commit refreshed

No changes to VERSIONS.txt, sk_types.h (SK_C_INCREMENT stays 0), scripts/azure-templates-variables.yml, or any C# source.

Build & test results (Linux x64)

  • dotnet cake --target=externals-linux --arch=x64: ✅ (13m 37s)
  • dotnet build binding/SkiaSharp/SkiaSharp.csproj: ✅ (0 errors, 4 pre-existing SDK warnings)
  • dotnet test tests/SkiaSharp.Tests.Console: ✅ Passed: 5584 / Failed: 0 / Skipped: 172 / Total: 5756 (2m 47s)

Items needing human attention

None. Only Linux x64 was built in this workflow — other platforms (Windows/macOS/iOS/Android/WASM) will be exercised by CI on this PR.

Created by skia-upstream-sync.

Bumps externals/skia to include 2 upstream cherry-picks on chrome/m150:
  * [M150] [ganesh] prevent stale readbacks
  * [Ganesh] If a resolve task fails to execute unwind the dirty tracking.

No C API changes; no version bump (release-line sync).

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 Jul 22, 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 -- 4517

PowerShell / Windows:

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

Step 2 — Add the local NuGet source

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

mattleibow added a commit to mono/skia that referenced this pull request Jul 22, 2026
[skia-sync] Merge upstream chrome/m150 bug fixes (#290)

Changes: 0aa2d54...8f1657d
Companion: mono/SkiaSharp#4517

Release-line bug-fix sync of the m150 fork: merge upstream chrome/m150
into release/4.150.x. The milestone is unchanged (stays m150) and there
is no version bump — this only picks up two upstream Ganesh correctness
cherry-picks that landed on chrome/m150 after our last sync.

The merge is a clean no-ff merge (strategy ort, no conflicts) that brings
the fork's src/gpu/ganesh files back in line with upstream chrome/m150;
after it, every touched file matches upstream exactly.

Upstream commits merged:

  * 587c5b0 — [M150] [ganesh] prevent stale readbacks (Bug: b/521491024)
    SurfaceContext::readPixels() ignored whether the content it was reading
    back had actually rendered, so a failed flush could return stale texture
    data. Flush success is now tracked through GrDrawingManager and readPixels
    bails out (returns false) when the flush fails and tasks were pending.

  * 37d3aa6 — [Ganesh] If a resolve task fails to execute unwind the dirty
    tracking (Bug: 517973093, Fixed: 536237281)
    Recording a texture-resolve task optimistically marks the proxy's MSAA/
    mipmap state clean. If the flush is dropped before the task executes, the
    proxy was left in an inconsistent dirty-rect state. The task now restores
    the proxy's prior dirty state in endFlush() when it never runs, so a later
    flush re-records the resolve.

Scope is entirely Ganesh GPU internals plus GPU test coverage
(6 files, +279/-11):

  * src/gpu/ganesh/GrDrawingManager.cpp
  * src/gpu/ganesh/GrTextureResolveRenderTask.{cpp,h}
  * src/gpu/ganesh/SurfaceContext.cpp
  * tests/GrSurfaceResolveTest.cpp, tests/ReadWritePixelsGpuTest.cpp

No changes to the C API shim (include/c, src/c), no DEPS changes, and no
new/removed/modified exported functions — SkiaSharp bindings and ABI are
unaffected, which is why the companion PR is just a submodule + cgmanifest
bump with no binding regeneration.
mono/skia#290 (the chrome/m150 bug-fix sync) was merged into
release/4.150.x as merge commit 80c7b8fd. Advance the submodule from the
pre-merge PR head 8f1657da to the branch tip 80c7b8fd so this PR tracks
the actual merged commit on release/4.150.x.

80c7b8fd is a no-ff merge of the already-merged 8f1657da, so the tree is
identical and there is no code change -- only the recorded submodule SHA
and the matching cgmanifest commitHash move forward. chrome_milestone
(150) and upstream_merge_commit (587c5b0f, upstream chrome/m150) are
unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 136c18de-5feb-4d18-ab98-0cc86fc42617
@mattleibow
mattleibow marked this pull request as ready for review July 22, 2026 20:03
@mattleibow
mattleibow merged commit 410a1d5 into release/4.150.x Jul 22, 2026
2 of 3 checks passed
@mattleibow
mattleibow deleted the skia-sync/release-4.150.x branch July 22, 2026 20:06
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.

2 participants