[skia-sync] Update skia to milestone 148#4120
Conversation
- Bump milestone 147 → 148 - Update soname to 148.0.0 - Update cgmanifest.json with m148 merge commit hash and metadata - Reset SK_C_INCREMENT to 0 for new milestone Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added R16Float (kR16_float_SkColorType = 21) and shifted subsequent enum values in SKColorTypeNative. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
New color type kR16_float_SkColorType was inserted in Skia m148 between kA16_float and kR16G16_float, shifting subsequent ordinals by 1. Changes: - Add SKColorType.R16Float = 28 to public enum - Add GetBytesPerPixel: R16Float => 2 bytes - Add GetBitShiftPerPixel: R16Float => 1 - Add GetAlphaType: R16Float is opaque (single-channel, no alpha) - Add ToNative/FromNative mappings in EnumMappings.cs - Add ToGlSizedFormat: R16Float => GRGlSizedFormat.R16F Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
On some Linux environments (e.g., GitHub Actions runners without libc++-dev installed), the LLVM libc++ headers are absent. This change detects whether libc++ headers/lib are present and falls back to -stdlib=libstdc++ with -static-libstdc++ if not. CI Docker images that ship libc++ static-only are unaffected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📦 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 -- 4120PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4120"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4120/packages --name skiasharp-pr-4120More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4120 |
Bump the externals/skia submodule to pick up the m148 toolchain fixes and
revert a Linux build regression introduced during the sync.
externals/skia (gn/toolchain/BUILD.gn):
- WASM: drop the new emsdk:activate dependency (SkiaSharp uses its own
version-pinned emsdk via skia_emsdk_dir, not the DEPS-bundled one).
- WASM: restore the ".a.wasm"/".so.wasm" static/shared library suffixes that
native/wasm/build.cake depends on (m148 flipped them to ".wasm.a"/".wasm.so").
- Mac Catalyst/watchOS: restore them to the Apple toolchain branch set that the
m148 current_os refactor dropped, fixing "ar: @libzlib.a.rsp: No such file".
native/linux/build.cake:
- Revert the libc++-detection / libstdc++ fallback that the sync added. The
.NET cross Docker images ship libc++ statically, so the detection misfired
and fell back to libstdc++, whose headers are absent in the cross sysroot
("fatal error: 'cstddef' file not found"). Restore unconditional -stdlib=libc++.
native/wasm/build.cake:
- Fail fast if the "*.a.wasm" glob matches nothing (so a future archive-naming
change can't silently produce an empty libSkiaSharp.a), and delete the stale
merged archive before recreating it.
Verified locally in the project Docker images: Linux x64
(libSkiaSharp.so.148.0.0) and WASM emscripten 3.1.56 (16 MB merged
libSkiaSharp.a, 1292 members) both build clean.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
📖 Documentation Preview The documentation for this PR has been deployed and is available at: 🔗 View Staging Site This preview will be updated automatically when you push new commits to this PR. This comment is automatically updated by the documentation staging workflow. |
Merge a new upstream bug-fix commit into the m148 sync branch. Upstream change merged into externals/skia (skia-sync/m148): - [m148] Reject Slugs that have creationMatrix with perspective Fixes corrupted data handling in text Slug deserialization. Adds runtime checks to prevent issues from unexpected perspective matrices in SubRunContainer. (upstream: a48e9118d9) native/linux/build.cake: - Detect libc++ availability via try-compile (more reliable than path checks). Falls back to -stdlib=libstdc++ on bare runners where libc++ headers are absent. Docker images that ship libc++ statically still use libc++ (probe succeeds there). cgmanifest.json: - Updated main Skia commitHash to 640d6b582549b5bea0ae9647a72d9b7c34b9b80d - Updated upstream_merge_commit to a48e9118d9621aa9b4bf3f20217e10bda3ddf880 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Closing as superseded by the m148 update in #4125 (submodule mono/skia#250, already merged). This auto-generated skia-sync PR is redundant. |
Automated Skia milestone bump from m147 to m148.
Companion skia PR: mono/skia#248
mono/SkiaSharp — Skia m148 SkiaSharp Sync Summary
Branch:
skia-sync/m148Breaking Change Analysis
Primary Change:
kR16_float_SkColorTypeinsertionA new color type was inserted in the
SkColorTypeenum in Skia m148:kA16_floatkA16_float(unchanged)kR16G16_floatkR16_float(NEW)kA16_unormkR16G16_float(shifted)kR8_unorm(was 27)Risk: HIGH (enum ordinal shift). Fixed by adding
R16_FLOAT_SK_COLORTYPEto C API withstatic_assertguard.Version / Binding Updates
scripts/VERSIONS.txtcgmanifest.jsonexternals/skia/include/c/sk_types.hSK_C_INCREMENTreset to 0 (new milestone)C# Changes
New public enum value:
SKColorType.R16Float = 28Added to
binding/SkiaSharp/:Definitions.csR16Float = 28toSKColorTypeenumDefinitions.csGetBytesPerPixel:R16Float => 2Definitions.csGetBitShiftPerPixel:R16Float => 1Definitions.csGetAlphaType:R16Float→ opaque (single-channel, no alpha)EnumMappings.csToNative:SKColorType.R16Float => SKColorTypeNative.R16FloatEnumMappings.csFromNative:SKColorTypeNative.R16Float => SKColorType.R16FloatGRDefinitions.csToGlSizedFormat:R16Float => GRGlSizedFormat.R16FSkiaApi.generated.csR16Float = 21added; subsequent values shifted to match C APIBuild script improvement
native/linux/build.cake: Added detection for libc++ header availability. Falls back to-stdlib=libstdc++with-static-libstdc++when libc++ headers are not installed (e.g., GitHub Actions runners). CI Docker images with libc++ static-only are unaffected.Build Results
Test Results
Failure Analysis
All 61 failures are pre-existing environment issues, not regressions:
SKFontManagerandSKTypefaceon headless runners without proper font configuration. These fail whenSKFontManager.Defaultis the firstSKObjectaccessed. Unrelated to m148 changes.R16Float-specific tests all pass (previously failed with
ArgumentOutOfRangeExceptionbefore fixes were applied).Items Needing Human Attention
ABI note:
SKColorTypeordinalsR16g16FloatthroughR8Unormall shifted by 1. Any code that relied on the raw integer values of these enum members (e.g., serialization) would be affected. The public-facingSKColorTypeenum in SkiaSharp uses its own stable ordinal sequence (R16Float = 28 is appended at the end), so SkiaSharp users are protected.DEPS history note: The merge commit in
externals/skiahas a leftover conflict marker that was fixed in the next commit. The git history in the submodule has one intermediate commit with a broken DEPS; human reviewer should be aware.Font test environment: The 61 failing tests on the headless CI runner should be investigated separately. They represent a pre-existing issue with
SKTypefacestatic initialization on runners without system fonts.Created by skia-upstream-sync.