Skip to content

feat(drawing)!: Factory seams, Skottie in the Skia backend, Svg/Lottie docs - #25117

Merged
MartinZikmund merged 8 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/svg-lottie-descriptions
Oct 9, 2026
Merged

MartinZikmund merged 8 commits into
unoplatform:masterfrom
ramezgerges:dev/rara/svg-lottie-descriptions

Conversation

@ramezgerges

@ramezgerges ramezgerges commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: closes unoplatform/uno-private#2401

PR Type:

✨ Feature

What changed? 🚀

Three related changes to how the SVG and Lottie renderers (and the other drawing seams) are packaged, described and registered.

1. Every drawing seam is reached through a factory

Until now, implementations were exposed three different ways:

  • Factory, type internal: SkiaBackend.CreateFontProvider() and the other Skia seams, and LottieBackend.CreateLottieRenderer().
  • Public type with a constructor: new SkiaGraphicsProvider(), new WebGpuGraphicsProvider(), and new ManagedSvgRenderer() and the other managed engines.
  • Not registerable at all: the Svg.Skia renderer. SvgBackend.CreateSvgRenderer() was internal, so a trimmed or AOT head (iOS, tvOS), which can't use the automatic lookup, had no way to use it.

Now it's Skia vs managed: each backend assembly has one public static entry class, whose Create…() factories return the neutral seam, and the implementations are internal. The Svg.Skia add-in extends SkiaBackend with its renderer's factory instead of having an entry class of their own.

Assembly Entry class Factories
Uno.UI.Composition.Skia SkiaBackend CreateGraphicsProvider() (+ an overload taking the preferred context kinds), CreateFontProvider(), CreateImageDecoder(), CreateGeometryFactory(), CreateLottieRenderer() (Skottie, see 2.)
Uno.UI.Svg (Svg.Skia add-in) extends SkiaBackend CreateSvgRenderer() (Svg.Skia could not be registered before)
Uno.UI.Composition.WebGpu WebGpuBackend (new) CreateGraphicsProvider()
Uno.UI.Composition.Managed ManagedBackend (new) CreateGeometryFactory(), CreateFontProvider() (+ an overload taking a bundled default font), CreateImageDecoder(), CreateSvgRenderer(), CreateLottieRenderer()
  • Same code on both paths: UnoPlatformHostBuilder creates every default through these factories, by name, so registering explicitly and relying on the default can't diverge.
  • Managed font provider default fixed: the managed font provider was never resolved as a default. Its only constructor has an optional parameter, which the host builder's parameterless constructor lookup never matched. The parameterless ManagedBackend.CreateFontProvider() fixes that.
  • Add-in factory on SkiaBackend: it's a C# 14 static extension member, so the SVG add-in project compiles as C# 14 (the rest of the repo stays at 13). An app writes SkiaBackend.CreateSvgRenderer() (C# 14, the default from .NET 10), and code on an older language version calls the extension class (SkiaBackendSvgExtensions.CreateSvgRenderer()). Uno.WinUI.Svg now depends on Uno.WinUI.Composition.Skia, which carries SkiaBackend, and CI stamps that dependency's version like Uno.WinUI's. SvgBackend and LottieBackend are gone.
  • Duplicates removed: two internal factories that duplicated the public ones (SkottieLottieRenderer.CreateLottieRenderer, ManagedLottieRenderer.CreateLottieRenderer).
  • SamplesApp updated: DrawingBackendConfiguration registers through the factories. Its iOS/tvOS block now registers the Svg.Skia renderer as well as Skottie, since those heads ship the add-in but couldn't use it.

Compatibility: SvgBackend and LottieBackend are removed, and seven public types become internal: SkiaGraphicsProvider, WebGpuGraphicsProvider, and the five Managed* seam implementations. None of these exists on release/stable/6.6 or release/stable/6.7, so no released API changes, and the package-diff baseline doesn't contain them.

2. Skottie ships in the Skia backend

Skottie is part of SkiaSharp's native library, and its managed wrapper plus Uno's renderer are about 80 KB, so it no longer needs an add-in. The Svg.Skia closure is about 1.4 MB managed, so SVG stays a separate add-in behind the Svg feature.

  • SkottieLottieRenderer moves from AddIns/Uno.UI.Lottie into Uno.UI.Composition.Skia, and Uno.WinUI.Composition.Skia now depends on SkiaSharp.Skottie. The Uno.UI.Lottie project and its stale build-time Skottie check are removed.
  • Lottie is rendered by Skottie whenever the Skia backend is present; otherwise the managed engine renders it.
  • The Uno.WinUI.Lottie package is removed. The Uno.Sdk no longer references it or injects SkiaSharp.Skottie, its entry is gone from the SDK's packages.json, and the solution templates no longer reference it. The 7.0 migration guide lists the removal.
  • The Lottie Uno Feature is removed. It did nothing on Uno Platform targets. On WinAppSDK it only added SkiaSharp.Views.WinUI, which Lottie there doesn't use; it never added CommunityToolkit.WinUI.Lottie. A listed lottie is stripped silently, like nativerenderer. Svg also stops adding SkiaSharp.Views.WinUI on WinAppSDK, where the OS renders SVG. Checked by evaluating Uno.Features.targets and the WinAppSDK targets with Lottie; Svg;Material and webgpu;lottie;svg.
  • Skia is implied only on Uno Platform targets. WinAppSDK renders with WinUI, but the implied skia gave every Windows head SkiaSharp.Views.WinUI, Uno.WinUI.Graphics2DSK and, with Toolkit, Uno.Toolkit.Skia.WinUI. A Windows head now gets them only when UnoFeatures lists Skia; shared code that uses SKCanvasElement or Toolkit Skia controls (ShadowContainer) on Windows has to list it, as the 7.0 migration guide says. skiarenderer is now mapped to skia rather than stripped, as the docs already claimed, so a legacy entry keeps Skia on Windows. Checked by evaluating the SDK targets for net10.0-windows10.0.19041 and net10.0-desktop with no features, Toolkit, Skia;Toolkit, SkiaRenderer;Toolkit and WebGpu: desktop is unchanged, and Windows gets the three packages only with Skia or SkiaRenderer.
  • The template package-content checks now expect SkiaSharp.Skottie.dll, not Uno.UI.Lottie.dll.

3. Package descriptions and docs

Uno.WinUI.Svg and Uno.WinUI.Lottie still described themselves as "Support for Svg/Lottie on Uno.WinUI". That suggests both are required and work the same on every backend, and neither is true anymore.

  • SVG renders without the package, through the managed engine in Uno.WinUI.
  • AnimatedVisualPlayer, LottieVisualSource, ThemableLottieVisualSource and a managed Lottie engine all ship in Uno.WinUI.
  • Uno.WinUI.Svg only swaps in the Svg.Skia renderer, and Skottie now comes with the Skia backend.

Package description:

  • Uno.WinUI.Svg: replaces the managed SVG engine with the Svg.Skia renderer, for SVG features the managed engine doesn't cover. Uno.WinUI renders SVG without it. Requires SkiaSharp.

Docs:

  • svg.md:
    • SVG works without any package.
    • The Svg feature switches to Svg.Skia, and only applies to apps using the Skia renderer.
    • A new SVG renderers table lists, for each renderer, when it's used and what it covers.
    • An explicit-registration example shows SkiaBackend.CreateSvgRenderer() / ManagedBackend.CreateSvgRenderer(), and when registration is required (trimmed or AOT heads).
    • Removed claims that were no longer true:
      • the warnings and errors for a missing package;
      • that the browser renders SVG on WebAssembly;
      • that rasterization isn't available on WebAssembly.
  • Lottie.md:
    • No feature or package is needed on Uno Platform targets: Skottie comes with the Skia renderer.
    • A new Lottie renderers table covers both renderers.
    • Lottie comes with Skia: the page no longer tells anyone to add packages.
    • An explicit-registration example shows SkiaBackend.CreateLottieRenderer() / ManagedBackend.CreateLottieRenderer().
  • using-the-uno-sdk.md: the Svg and Lottie feature rows now match what the SDK targets do.
  • migrating-to-uno-7.md: the Uno.WinUI.Lottie and Lottie feature removal is listed under Packages, the feature is gone from the Uno.Sdk features table, and updating-to-winui3.md notes it next to the old Uno.UI.Lottie rename.
  • Skottie is added to the cspell word list.
  • The internal design docs' registration snippets use the factories.

The Uno.WinUI.Svg package ID is unchanged, as the issue requests. Uno.WinUI.Lottie is removed rather than redescribed, since nothing is left in it.

Validation:

  • Runtime (SamplesApp desktop, both drawing backends):
    • After the Skottie move: 48 of 48 pass on Skia and 48 of 48 with UNO_WEBGPU=1, covering Given_UnoPlatformHostBuilder_DrawingSeams, Given_AnimatedVisualPlayer and Given_ManagedLottie.
    • Before it: 26 of 26 on each backend, which also covered Given_SvgImageSource_ManagedEngine.
  • Unit tests: the Lottie and composition unit tests pass (37 of 37).
  • What the new test pins:
    • the defaults resolved on desktop are Svg.Skia and Skottie, which now comes from Uno.UI.Composition.Skia;
    • all 12 factories are public and return their seam, the SVG add-in's extension factory included;
    • no seam implementation is public in any of the five assemblies.
    • An earlier version of it, run against master's code, failed on exactly the then-internal factories.
  • Compile: the SamplesApp desktop head builds with analyzers on after the Skottie move, and so does Uno.UI.UnitTests. Before the move, the Skia, WebGPU and managed backends, Uno.UI, both add-ins (net10.0 and net11.0) and the runtime tests built with analyzers on. A C# 14 app compiled against the built assemblies calls SkiaBackend.CreateSvgRenderer(), SkiaBackend.CreateLottieRenderer() and SkiaBackend.CreateFontProvider() side by side.
  • Not built locally: the SamplesApp's iOS/tvOS registration block, the NuGet packages themselves (nuget pack), and the solution templates; CI covers them.
  • Docs checks: every statement was checked against the code (renderer selection in the host builder, the managed engines' coverage, and the Uno.Sdk feature conditions). markdownlint and cspell (repo configs) pass on the changed docs. The DocFX site build was not run locally.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (for bug fixes / features, if applicable)
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features)
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes: the Uno.WinUI.Lottie package and the Lottie Uno Feature are removed, and Skia is no longer implied on WinAppSDK (all listed in the 7.0 migration guide). The types made internal never shipped.
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

🤖 Generated with Claude Code

ramezgerges and others added 4 commits October 7, 2026 15:28
Uno.WinUI.Svg and Uno.WinUI.Lottie still described themselves as
"Support for Svg/Lottie on Uno.WinUI", which reads as required and
backend-neutral. SVG now renders without the package through the
managed engine, and the Lottie player, its sources and a managed Lottie
engine live in Uno.WinUI; each package only swaps in a SkiaSharp
renderer (Svg.Skia, Skottie).

The package descriptions and the SVG, Lottie and Uno.Sdk feature docs
now say which renderer is used when, what each covers, and how each
draws on the Skia and WebGPU backends. The package IDs are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Every drawing seam is now created the same way, Skia vs managed: each
backend assembly has one public static *Backend entry class whose
Create* factories return the neutral seam, and the implementations are
internal.

- New ManagedBackend (geometry, fonts, image decoding, SVG, Lottie) and
  WebGpuBackend (graphics provider).
- SkiaBackend.CreateGraphicsProvider is public, with an overload for
  the preferred context kinds.
- The Svg.Skia and Skottie add-ins extend SkiaBackend with
  CreateSvgRenderer / CreateLottieRenderer (C# 14 static extension
  members, so those two projects compile as C# 14). They replace
  SvgBackend and LottieBackend; Svg.Skia, previously internal, can now
  be registered on a trimmed or AOT head. Both add-in packages depend
  on Uno.WinUI.Composition.Skia, which carries SkiaBackend.
- The host builder resolves every default through these factories, so
  explicit registration and the default reach the same code. The
  managed font provider is now found too: its only constructor has an
  optional parameter, which the parameterless lookup never matched.

None of the types made internal or removed has shipped in a release.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The SVG and Lottie pages show how to register each renderer through
its factory, and when that is required (trimmed or AOT heads).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Skottie is part of SkiaSharp's native library and its managed wrapper is
small, so it no longer needs an add-in: SkiaBackend.CreateLottieRenderer()
now lives in Uno.UI.Composition.Skia and the host builder resolves it
whenever the Skia backend is present. The Uno.WinUI.Lottie package is
removed, and the Uno.Sdk no longer references it. SVG stays a separate
add-in.

BREAKING CHANGE: the Uno.WinUI.Lottie package is removed; Lottie needs
no package on Uno Platform targets.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added area/solution-templates Categorizes an issue or PR as relevant to the solution template area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation kind/documentation area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk labels Oct 8, 2026
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238181 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1155

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Examples.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • DropDownButtonPage.png-dark
  • skia-windows-screenshots: 1155 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewSpanningRectsPage.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutoBorderStretchwithrightmargin.png-dark
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png
    • Border_CornerRadius_Alignments.png-dark
    • Border_CornerRadius_Alignments.png
    • Brushes_ImplicitConvert.png-dark
    • Brushes_ImplicitConvert.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CheckBox_IsEnabled_Automated.png-dark
    • CheckBox_IsEnabled_Automated.png
    • Accessibility_ScreenReader.png-dark
    • ApplicationViewSpanningRectsPage.png
    • AutoBorderStretchwithrightmargin.png

@unodevops

Copy link
Copy Markdown
Contributor

ramezgerges and others added 3 commits October 8, 2026 09:27
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Lottie is built into Uno.WinUI and Skottie comes with the Skia backend,
so the feature did nothing on Uno targets. On WinAppSDK it only added
SkiaSharp.Views.WinUI, which Lottie there never used; it never added
CommunityToolkit.WinUI.Lottie. A listed 'lottie' is now ignored, like
'nativerenderer'. Svg no longer adds SkiaSharp.Views.WinUI on WinAppSDK
either, where the OS renders SVG.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
WinAppSDK renders with WinUI, yet the implied 'skia' gave every Windows
head SkiaSharp.Views.WinUI, Uno.WinUI.Graphics2DSK and, with Toolkit,
Uno.Toolkit.Skia.WinUI. A Windows head now gets them only when
UnoFeatures lists Skia. 'skiarenderer' is mapped to 'skia' instead of
stripped, so a legacy entry still keeps Skia on Windows.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238235 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1186

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • DropDownButtonPage.png-dark
    • Examples.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
  • skia-windows-screenshots: 1186 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AnimatedIconPage.png
    • AppBarButtonWithIconTest.png
    • ApplicationViewSpanningRectsPage.png
    • AppWindowFeatures.png-dark
    • AutoBorderStretchwithrightmargin.png
    • AutoSizedPathCentered.png-dark
    • BasicEnability.png-dark
    • BitmapIcon_Foreground.png
    • Border_AntiAlias.png-dark
    • Border_AntiAlias.png
    • Border_CornerRadius_Gradient.png-dark
    • Border_CornerRadius_Gradient.png
    • Button_IsEnabled_Automated.png-dark
    • Button_IsEnabled_Automated.png
    • Button_Opacity_Automated.png-dark
    • Button_Opacity_Automated.png
    • ComboBox_Legacy.png-dark
    • ComboBox_Legacy.png
    • CommandBarFlyoutMainPage.png-dark

The Uno.WinUI.Lottie add-in and its buildTransitive Skia check are gone,
so the test imported a missing file.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added the area/code-generation Categorizes an issue or PR as relevant to code generation label Oct 8, 2026
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238283 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1198

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • DisplayInformation.png-dark
    • DynamicFont.png-dark
    • DynamicFont.png
    • Examples.png
    • DropDownButtonPage.png-dark
  • skia-windows-screenshots: 1198 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AutomationProperties_Relations.png-dark
    • AutoSuggestBox_Keyboard.png-dark
    • AutomationProperties_Relations.png
    • AutoSuggestBox_Keyboard.png
    • AutoSuggestBox_Icons.png-dark
    • BasicEnability.png-dark
    • AutoSuggestBox_Icons.png
    • BasicEnability.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
    • BitmapIcon_Sizing.png-dark
    • BorderVersusPanelClipping.png-dark
    • BitmapIcon_Sizing.png
    • BorderVersusPanelClipping.png
    • Border_LinearGradientBrush.png-dark
    • Border_LinearGradientBrush.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • Brushes_ImplicitConvert.png-dark

@unodevops

Copy link
Copy Markdown
Contributor

@mergify

mergify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit 9ab23aa into unoplatform:master Oct 9, 2026
55 checks passed
@ramezgerges
ramezgerges deleted the dev/rara/svg-lottie-descriptions branch October 15, 2026 11:12
Xiaoy312 added a commit to unoplatform/Uno.Themes that referenced this pull request Oct 15, 2026
- Moves past dev.1664, where unoplatform/uno#25117 folds Lottie into Uno.UI and drops the Uno.WinUI.Lottie package and the Lottie Uno feature
- Same version Hot Design consumes Themes with (unoplatform/uno.hotdesign#8261)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Xiaoy312 added a commit to unoplatform/Uno.Themes that referenced this pull request Oct 15, 2026
- Uno 7.0.0-dev.1664 removed the feature (unoplatform/uno#25117): LottieVisualSource now ships in Uno.UI under the same namespace, so the ProgressRing XAML resolves unchanged
- On dev.2285 the declaration was already a silent no-op; the restored package graph is identical with and without it
- Consumers no longer get Uno.WinUI.Lottie transitively from Uno.Material.WinUI / Uno.Cupertino.WinUI (it does not exist past dev.1664)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ehtick pushed a commit to ehtick/uno.extensions that referenced this pull request Nov 6, 2026
- Toolkit 11.0.0-dev.140 and Themes 9.0.0-dev.41 depend on Uno.WinUI.Lottie. The XAML
  generator compiles a call to the GlobalStaticResources of every referenced XAML assembly,
  so Navigation.Toolkit.WinUI and Reactive.WinUI hard-referenced Uno.UI.Lottie.
- Uno.Sdk 7.0.0-dev.89 apps no longer ship that assembly (Lottie is part of Uno.WinUI since
  unoplatform/uno#25117), so they failed with FileNotFoundException before any window.
- Move Toolkit and Themes to the versions Uno.Sdk 7.0.0-dev.89 pins, and Uno.Sdk.Private to
  7.0.0-dev.2428, the Uno.WinUI that SDK uses (both packages require >= 7.0.0-dev.2285).

Fixes unoplatform#3262

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/code-generation Categorizes an issue or PR as relevant to code generation area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk area/solution-templates Categorizes an issue or PR as relevant to the solution template kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants