Skip to content

update: Support SkiaSharp 4 in MAUI and Avalonia 12 consumers - #3390

Merged
pauldendulk merged 3 commits into
mainfrom
refactor/render-cache-architecture
Oct 2, 2026
Merged

pauldendulk merged 3 commits into
mainfrom
refactor/render-cache-architecture

Conversation

@pauldendulk

@pauldendulk pauldendulk commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Mapsui stays compiled against SkiaSharp 3.119.4, and MAUI and Avalonia 12 apps can now opt in to SkiaSharp 4 by referencing it explicitly. MAUI is covered by automated tests; Avalonia 12 was verified by running its desktop sample.

  • update MAUI consumers to SkiaSharp 4.151.2 while keeping the shared renderer compiled against SkiaSharp 3.119.4
  • update Avalonia 12 and ReactiveUI.Avalonia to 12.1.2
  • run the Avalonia 12 samples on SkiaSharp 4.151.2 / HarfBuzzSharp 14.2.1.102. Avalonia 12.1 supports SkiaSharp 4 when the app references it explicitly (AvaloniaUI/Avalonia#21696). The Mapsui.UI.Avalonia12 package itself stays on SkiaSharp 3.
  • the Avalonia 12 desktop sample no longer uses Vulkan: Avalonia 12.1's Vulkan backend crashes with SkiaSharp 4 (access violation in VulkanDevice.Create), while ANGLE works
  • add runtime and packaged-consumer coverage for SkiaSharp 4, native loading, and RichTextKit/HarfBuzz
  • document the supported SkiaSharp 3/4 compatibility bridge, including the Avalonia Vulkan caveat

Validation

  • SkiaSharp 3 renderer path passed
  • SkiaSharp 4 MAUI project-reference and packaged-consumer paths passed
  • mandatory Android builds passed
  • standard renderer regression suite passed (128 cases)
  • experimental renderer still has existing image mismatches and exhausted memory during the full run; focused RTL and emoji samples passed, while the existing CalloutWrapAroundSample mismatch reproduced
  • Avalonia 12 desktop sample on SkiaSharp 4 (Windows):
    • with ANGLE, the map renders correctly in 3 of 3 runs, with SkiaSharp 4.151.2 and HarfBuzzSharp 14.2.1.102 loaded
    • with Vulkan, it crashed in 5 of 6 runs and never rendered
    • the SkiaSharp 3 baseline renders fine with Vulkan
  • Avalonia 12 Browser sample resolves SkiaSharp 4 and compiles, but was not run in a browser. Its .NET 10 build fails on existing IDE0055 formatting errors in Mapsui core, which also happen on SkiaSharp 3.
  • Avalonia 12 Android/iOS samples not built (they already cannot build: they target net9.0 while Avalonia 12.1.2 ships only net10.0 assets)

Relates to #3376

🤖 Generated with Claude Code

- Added a test for packaged MAUI consumer with SkiaSharp 4 in the CI workflow.
- Modified Program.cs in benchmarks to support command-line arguments for BenchmarkSwitcher.
- Changed ScaleBarFontPerformance class to allow inheritance and updated Dispose method.
- Updated Directory.Build.props to use MauiVersion 9.0.120 and adjusted SkiaSharp and HarfBuzzSharp compatibility versions.
- Updated Directory.Packages.props to use ReactiveUI.Avalonia 12.1.2.
- Updated Avalonia12 Directory.Build.props to match the latest versions.
- Updated Android, Desktop, iOS, and main Avalonia12 project files to use the latest package versions.
- Added SkiaSharp and HarfBuzzSharp references to Maui sample and tests to ensure compatibility.
- Created SkiaSharpCompatibilityTests to validate SkiaSharp 4 integration.
- Updated image comparison tool to use the latest ReactiveUI version.
- Documented SkiaSharp compatibility in the v6.0 upgrade guide.
- Created plans for ongoing work and documented completed tasks related to font resolution performance and SkiaSharp upgrade follow-up.
@pauldendulk pauldendulk added the PR type: 📦 Update Updates to third-party libraries, SDKs, etc. label Sep 14, 2026
pauldendulk and others added 2 commits September 15, 2026 11:03
Avalonia 12.1 supports SkiaSharp 4 when an app references it explicitly,
so the Avalonia 12 samples now opt in to SkiaSharp 4.151.2 and
HarfBuzzSharp 14.2.1.102, matching the MAUI sample. The Mapsui library
stays compiled against SkiaSharp 3.119.4.

SkiaSharp.HarfBuzz and HarfBuzzSharp.NativeAssets.Linux are pinned too,
otherwise they stayed on the 3.x/8.x line.

Avalonia 12.1's Vulkan backend crashes with SkiaSharp 4 (access violation
in VulkanDevice.Create), so the desktop sample no longer tries Vulkan and
starts with ANGLE. The upgrade guide documents both points.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pauldendulk pauldendulk changed the title update: Support SkiaSharp 4 in MAUI consumers update: Support SkiaSharp 4 in MAUI and Avalonia 12 consumers Oct 2, 2026
@pauldendulk
pauldendulk merged commit 68d241b into main Oct 2, 2026
7 checks passed
@pauldendulk
pauldendulk deleted the refactor/render-cache-architecture branch October 2, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR type: 📦 Update Updates to third-party libraries, SDKs, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant