[skia-sync] Update skia to milestone 150#4121
Draft
mattleibow wants to merge 1 commit into
Draft
Conversation
- Bump milestone 147 → 150, reset SK_C_INCREMENT=0 - Update cgmanifest.json (commitHash + chrome_milestone=150) - Regenerate SkiaApi.generated.cs: R16Float enum inserted between A16Float and R16g16Float; all subsequent values shift +1 - Add SKColorType.R16Float = 28 to public enum (Definitions.cs) - Add SKColorType.R16Float ↔ SKColorTypeNative.R16Float mappings (EnumMappings.cs, ToNative/FromNative) - Update native/linux/build.cake: auto-detect libc++ availability, fall back to libstdc++ on bare runners (GitHub Actions) while preserving libc++ for Docker cross-compilation images - Update externals/skia submodule to skia-sync/m150 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
📦 Try the packages from this PRWarning 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 -- 4121PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4121"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4121/packages --name skiasharp-pr-4121More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4121 |
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.
Automated Skia milestone bump from m147 to m150.
Companion skia PR: mono/skia#249
mono/SkiaSharp: Skia m147 → m150 sync
Overview
Sync SkiaSharp from Skia milestone 147 to milestone 150.
NuGet packages will be versioned 4.150.0.
Breaking change analysis
kR16_float_SkColorTypeinserted inSkColorTypeenum (m148)A new color type was inserted in the middle of the
SkColorTypeC++ enum, betweenkA16_floatandkRG16_float. This shifted all subsequent enum integer values by 1.Impact: The C API
sk_colortype_tenum had the same shift; static_assert verificationwould have caught any mismatch at compile time.
Resolution:
R16_FLOAT_SK_COLORTYPEto the C API shim (sk_types.h,sk_enums.cpp)SKColorType.R16Float = 28to the public C# enum (Definitions.cs)SKColorType.R16Float ↔ SKColorTypeNative.R16FloattoEnumMappings.csGetBytesPerPixel: R16Float → 2 bytesGetBitShiftPerPixel: R16Float → shift 1GetAlphaType: R16Float → Opaque (no alpha channel)Other upstream changes (no C# wrapper work required)
SkShader::isOpaque()made pure virtual — affects only custom shader implementationsSkFont::makeStrikeRef()added (additive only)SkFontMgr::match(Request&)andfallback(Request&)added (additive only)Version file changes
scripts/VERSIONS.txtcgmanifest.jsonC# changes
binding/SkiaSharp/SkiaApi.generated.csbinding/SkiaSharp/Definitions.csR16Float = 28toSKColorType; added to BytesPerPixel/BitShift/AlphaType helpersbinding/SkiaSharp/EnumMappings.csR16FloattoToNative/FromNativeswitchnative/linux/build.cakeBuild results
libSkiaSharp.so.150.0.0libHarfBuzzSharp.so.0.61420.0Test results
Failed tests (62): All in
SKPaintTest,SKFontTest,SKTypefaceTest— font/glyphmeasurement tests that require the default system typeface to have glyph metrics.
Root cause:
SKTypeface.Default.GlyphCount == 0(default system typeface returns emptymetrics in this CI environment, likely a fontconfig cache/environment issue).
These failures are pre-existing and unrelated to m150 changes.
Test crash at end:
munmap_chunk(): invalid pointer— cleanup issue with the emptydefault typeface; also pre-existing/environment-specific.
Items needing human attention
R16Floatnew public API: The newSKColorType.R16Floatenum value is a public APIaddition. This is additive (ABI-safe) but users may want to know about it.
SkFont.breakText()preservation: Our fork-specificbreakText()method ininclude/core/SkFont.hwas preserved in the merge. Must be verified in every futuremerge.
native/linux/build.cakestdlib fallback: The libstdc++ fallback was added to supportbuilding in environments without libc++ (e.g., bare GitHub Actions runners). The Docker
cross-image builds will still use libc++ since they have it. This change should be
harmless for production builds but should be reviewed.
Test font failures: If the 62 font-related test failures are NOT pre-existing in the
m147 CI baseline, they need investigation. The root cause would be either an upstream
Skia change affecting font manager behavior or a build issue with the libstdc++ build.
Created by skia-upstream-sync.