Skip to content

feat: upgrade Skia to m147 (Ganesh + Graphite)#3777

Draft
kbrandwijk wants to merge 8 commits intoShopify:mainfrom
kbrandwijk:feat/skia-m147
Draft

feat: upgrade Skia to m147 (Ganesh + Graphite)#3777
kbrandwijk wants to merge 8 commits intoShopify:mainfrom
kbrandwijk:feat/skia-m147

Conversation

@kbrandwijk
Copy link
Copy Markdown
Contributor

Summary

Upgrade Skia submodule from m146 to m147 for both Ganesh and Graphite.

Depends on: #3776 (m146 upgrade) — would normally base off that branch, but it only exists in the fork

Changes

Submodule

  • Bump externals/skia to chrome/m147
  • Update .gitmodules branch reference

No code changes required

All breaking changes in m147 were verified to not affect react-native-skia:

  • SK_SUPPORT_UNSPANNED_APIS removed — all raw pointer+count overloads on SkCanvas, SkFont, SkMatrix, SkPathBuilder, SkDashPathEffect, SkTextBlob, SkTypeface, SkRect are gone. Not affected: all JSI bindings and recorder code already use SkSpan-based APIs (migrated in earlier work).
  • SkCodec::getEncodedData() removed — not used in react-native-skia
  • LogPriority.h moved from include/gpu/graphite/ to include/private/base/SkLogPriority.h — not referenced directly; SKGPU_GRAPHITE_LOWEST_ACTIVE_LOG_PRIORITY backwards compat maintained
  • D3D backend restructuring (GrD3DBackendSurface.h, GrD3DDirectContext.h, GrD3DBackendSemaphore.h) — not relevant, we use Metal/Dawn
  • VulkanBackendContext::fMemoryAllocator no longer optional — not used
  • SkImage::refEncodedData() returns sk_sp<const SkData> — not called directly
  • SkBitmap::installMaskPixels removed — not used
  • SkFont::getPath(SkGlyphID, SkPath*) mutable overload removed — not used
  • SkPathBuilder::setLastPt deprecated — already using setLastPoint/setPoint (added in m145 PR)
  • SK_DISABLE_LEGACY_SHADERCONTEXT removed — legacy shader context already always disabled

Test plan

  • Graphite iOS build from source at m147 (in progress locally)
  • yarn test — 74 suites, 691 tests pass
  • Android build
  • Device validation on iOS

Will pull out of draft once iOS build completes successfully.

🤖 Generated with Claude Code

kbrandwijk and others added 8 commits March 25, 2026 12:43
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JsiSkPath now wraps SkPathBuilder internally — mutations go directly
to the builder, reads snapshot to SkPath. Adds setLastPoint/setPoint.
DawnTextureInfo uses SampleCount instead of uint32_t.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Guard dawn.gni sed against missing file
- Add iOS support to Dawn cmake_utils.py (missing upstream)
- Fix iOS simulator sysroot for Dawn cmake builds
- Make skia_use_cpp20 conditional on Graphite

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds JsiSkPathBuilder host object with explicit builder semantics:
snapshot() for non-destructive SkPath copy, build() to detach and reset.
Registered as Skia.PathBuilder.Make() and Skia.PathBuilder.MakeFromPath().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SkGradientShader.h is deleted in m146. All gradient factories now use
SkShaders::LinearGradient/RadialGradient/SweepGradient/TwoPointConicalGradient
with SkGradient::Colors (SkColor4f) and SkGradient::Interpolation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- filterPath/getSegment/FillPathWithPaint now use SkPathBuilder* output
  (mutable SkPath* overloads removed in m146)
- WrapBackendTexture: drop deprecated SkColorType param (Graphite only)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wcandillon
Copy link
Copy Markdown
Contributor

Thanks for doing these, it is showing the migration path. I am in progress to merge/publish the new Path API changes then we will be able to migrate to m147

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.

2 participants