Add Graphite native and MAUI views - #4728
mattleibow wants to merge 1 commit into
Conversation
Add Metal and Vulkan native controls, a cross-platform MAUI handler, presentation interop, tests, packaging, and a multi-recorder sample.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 00cda8ff-9603-406f-ae2e-45c70e39b3e7
📦 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 -- 4728PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4728"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-4728/packages --name skiasharp-pr-4728More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4728 |
📊 SkiaSharp benchmarks — PR #4728⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 33 slower · 🟢 54 faster
📦 Allocations — 🔴 1 more alloc · 🟢 0 less alloc
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
📦 Allocations (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
|
📖 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. |
|
Superseded by the requested three-PR split:
All three target |
Description
Adds production-oriented Graphite presentation controls for Apple and Android, then layers a backend-neutral
SKGraphiteViewover them for .NET MAUI.Apple uses
MTKView+ Metal. Android usesTextureView+ Vulkan with explicit acquire/render/present synchronization, swapchain recreation, device-loss containment, and a bounded reusable Graphite/Vulkan core. A newSkiaSharp.Views.Graphitepackage keeps the unsigned Silk.NET dependency isolated from the existing signed views assembly.The MAUI sample demonstrates Graphite's actual record/snap/insert/submit model: a cached background
Recordingis replayed while two thread-affine recorders build animated layers concurrently. It exposes the backend, FPS, resource budget, worker mode, and workload controls without claiming unmeasured Ganesh performance wins.Related issues
Fixes #4721
Related to #3962
Required skia PR
Requires mono/skia#345
Areas affected
binding/)externals/skia/src/c,include/c)Changes
Public API
Behavior
Testing
SkiaSharp.Views.Graphite, MAUI Core, and MAUI Controls across current/previous Apple + Android TFMs.ganesh-gl/DiagonalLinesmacOS golden mismatch remains reproducible with no Graphite code path involved.Graphite sample screenshots
Checklist
Changesabove lists all public API and behavioral changes (or "None.")mono/skiaPR linked above and bindings regenerated