feat: upgrade Skia to m147 (Ganesh + Graphite)#3777
Draft
kbrandwijk wants to merge 8 commits intoShopify:mainfrom
Draft
feat: upgrade Skia to m147 (Ganesh + Graphite)#3777kbrandwijk wants to merge 8 commits intoShopify:mainfrom
kbrandwijk wants to merge 8 commits intoShopify:mainfrom
Conversation
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>
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
externals/skiatochrome/m147.gitmodulesbranch referenceNo code changes required
All breaking changes in m147 were verified to not affect react-native-skia:
SK_SUPPORT_UNSPANNED_APISremoved — all raw pointer+count overloads onSkCanvas,SkFont,SkMatrix,SkPathBuilder,SkDashPathEffect,SkTextBlob,SkTypeface,SkRectare gone. Not affected: all JSI bindings and recorder code already useSkSpan-based APIs (migrated in earlier work).SkCodec::getEncodedData()removed — not used in react-native-skiaLogPriority.hmoved frominclude/gpu/graphite/toinclude/private/base/SkLogPriority.h— not referenced directly;SKGPU_GRAPHITE_LOWEST_ACTIVE_LOG_PRIORITYbackwards compat maintainedGrD3DBackendSurface.h,GrD3DDirectContext.h,GrD3DBackendSemaphore.h) — not relevant, we use Metal/DawnVulkanBackendContext::fMemoryAllocatorno longer optional — not usedSkImage::refEncodedData()returnssk_sp<const SkData>— not called directlySkBitmap::installMaskPixelsremoved — not usedSkFont::getPath(SkGlyphID, SkPath*)mutable overload removed — not usedSkPathBuilder::setLastPtdeprecated — already usingsetLastPoint/setPoint(added in m145 PR)SK_DISABLE_LEGACY_SHADERCONTEXTremoved — legacy shader context already always disabledTest plan
yarn test— 74 suites, 691 tests pass🤖 Generated with Claude Code