Skip to content

fix!: Add support for MAUI Embedding on supported skia-based platforms - #2788

Merged
kazo0 merged 7 commits into
mainfrom
dev/sb/skia-maui
Jun 10, 2025
Merged

kazo0 merged 7 commits into
mainfrom
dev/sb/skia-maui

Conversation

@kazo0

@kazo0 kazo0 commented May 30, 2025 •

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: The Uno SDK Dependency has been updated to 6.0, which includes breaking changes.

@kazo0 kazo0 changed the title chore: wip fix: Skia Maui Embedding Support May 30, 2025
Comment thread global.json Resolved
@jeromelaban
jeromelaban requested a review from Copilot June 2, 2025 12:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes issues related to Skia Maui Embedding support and updates the configuration and initialization for Maui embedding across Windows. Key changes include adding a new project for the Skia runtime, consolidating global usings and platform-specific initialization logic in MauiEmbedding and MauiInitExtension, and updating package references and solution files.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Uno.Extensions.Maui.WinUI.Runtime.Skia/Uno.Extensions.Maui.WinUI.Runtime.Skia.csproj New project file for Skia runtime (note the SDK change)
src/Uno.Extensions.Maui.WinUI.Runtime.Skia/GlobalUsings.cs Added common global usings for Windows and Maui
src/Uno.Extensions.Maui.UI/Uno.Extensions.Maui.WinUI.csproj Updated IsMauiEmbedding setting and related property groups
src/Uno.Extensions.Maui.UI/MauiEmbedding.cs Refactored Maui embedding initialization to delegate to MauiInitExtension
Other files Removed/moved platform-specific initialization files and updated dependencies/solution
Comments suppressed due to low confidence (1)

Uno.Extensions.Maui.WinUI.Runtime.Skia/Uno.Extensions.Maui.WinUI.Runtime.Skia.csproj:1

  • The project file now uses Microsoft.NET.Sdk instead of Uno.Sdk; if this change was intentional, please confirm its compatibility with the rest of the solution or consider aligning with the existing SDK usage.
<Project Sdk="Microsoft.NET.Sdk">

@kazo0
kazo0 force-pushed the dev/sb/skia-maui branch 3 times, most recently from 0611b9a to ee2b720 Compare June 3, 2025 02:14
@kazo0 kazo0 changed the title fix: Skia Maui Embedding Support fix!: Add support for MAUI Embedding on supported skia-based platforms Jun 3, 2025
@kazo0
kazo0 requested a review from Copilot June 3, 2025 02:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Uno SDK to 6.0 and refactors MAUI embedding support into a runtime extension for Skia-based platforms, removing old platform-specific embedding code.

  • Introduces a new Uno.Extensions.Maui.WinUI.Runtime.Skia project with its own global usings.
  • Refactors MAUI embedding logic into MauiEmbeddingExtension (and SkiaMauiEmbeddingExtension), replacing inlined #if MAUI_EMBEDDING blocks.
  • Bumps several package versions and updates solution/project files to include the new runtime project.

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Uno.Extensions.Maui.WinUI.Runtime.Skia/GlobalUsings.cs Adds global usings for the new Skia-based runtime project
src/Uno.Extensions.Maui.UI/Uno.Extensions.Maui.WinUI.csproj Changes MAUI embedding condition, removes old define constant
src/Uno.Extensions.Maui.UI/PlatformViewProvider.cs Adds placeholder for platform view provider
src/Uno.Extensions.Maui.UI/MauiHost.cs Replaces #if MAUI_EMBEDDING logic with extension calls
src/Uno.Extensions.Maui.UI/Extensibility/Impl/MauiEmbeddingExtension.cs Adds new runtime extension implementation
Directory.Packages.props Bumps dependency package versions
global.json Updates Uno SDK versions
Uno.Extensions.sln and Uno.Extensions-packageonly.slnf Registers the new Skia runtime project in the solution files
Comments suppressed due to low confidence (2)

src/Uno.Extensions.Maui.UI/Uno.Extensions.Maui.WinUI.csproj:12

  • The MAUI_EMBEDDING constant is no longer defined after removing the <DefineConstants> element. You should re-add something like <DefineConstants>$(DefineConstants);MAUI_EMBEDDING</DefineConstants> so the extension code under #if MAUI_EMBEDDING compiles.
<IsMauiEmbedding Condition="'$(IsMauiEmbedding)'==''">true</IsMauiEmbedding>

src/Uno.Extensions.Maui.UI/Extensibility/Impl/MauiEmbeddingExtension.cs:19

  • The class declaration includes parentheses, which is invalid C# syntax. Remove the () so it reads SkiaMauiEmbeddingExtension : IMauiEmbeddingExtension (or MauiEmbeddingExtension in the other branch).
    SkiaMauiEmbeddingExtension()

@kazo0
kazo0 marked this pull request as ready for review June 3, 2025 03:11
Comment thread doc/Learn/UpdatingExtensions.md Resolved
@agneszitte agneszitte linked an issue Jun 4, 2025 that may be closed by this pull request
1 of 2 tasks
@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 167703 has failed on uno.extensions.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 167745 has failed on uno.extensions.

@dr1rrb
dr1rrb force-pushed the dev/sb/skia-maui branch from c7e1662 to af35572 Compare June 6, 2025 15:29
@kazo0

kazo0 commented Jun 7, 2025

Copy link
Copy Markdown
Contributor Author

@Mergifyio backport release/stable/5.3

@mergify

mergify Bot commented Jun 7, 2025 •

Copy link
Copy Markdown

backport release/stable/5.3

✅ Backports have been created

Details

@dr1rrb

dr1rrb commented Jun 9, 2025 •

Copy link
Copy Markdown
Member

Mergifyio backport release/stable/5.3

@kazo0 Not sure we should backport this ... especially since we bump the version number to 6.0 (of uno, but also of extensions) in this PR

cc. @jeromelaban @agneszitte

@kazo0
kazo0 force-pushed the dev/sb/skia-maui branch from 914a1cf to 4cda2eb Compare June 9, 2025 16:00
@jeromelaban

Copy link
Copy Markdown
Member

@kazo0 indeed, there no need for a backport, it can be a new release branch.

@kazo0

kazo0 commented Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

/unobot prepare-release --commit-message-pattern "ci: Set version to '{0}'"

@unodevops

Copy link
Copy Markdown
Contributor

The release branch release/stable/6.0 has been created from 90c3c93 and the PR #2796 has been created for the version bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Skia] MAUI embedding doesn't work

7 participants