mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.54k stars 543 forks source link

WinUI view not working on WindowsAppSdk 1.6 #3007

Closed beto-rodriguez closed 1 month ago

beto-rodriguez commented 2 months ago

Description

I am not able to run an app containing an SKXamlCanvas on WindowsAppSdk 1.6, not completely sure if the issue belongs to this library or to WindowsAppSdk.

Code

Based on my research on:

https://github.com/beto-rodriguez/LiveCharts2/issues/1580

I can confirm that LiveCharts does not work on WindowsAppSdk 1.6, then I realized that even just the SKXamlCanvas does work on that version.

Expected Behavior

No response

Actual Behavior

No response

Version of SkiaSharp

2.88.3 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

WindowsAppSdk 1.6

Devices

No response

Relevant Screenshots

No response

Relevant Log Output

No response

Code of Conduct

inforithmics commented 2 months ago

It is this issue,

https://github.com/mono/SkiaSharp/issues/2999

the Bug is fixed but a new Skiasharp 3 nugget release is needed.

mattleibow commented 2 months ago

Can you try the latest nightly on https://aka.ms/skiasharp-eap/index.json and let me know if it starts working again? I want to do a release, but I want to make sure I fixed it.

Mangepange commented 1 month ago

@mattleibow Using the latest Microsoft.WindowsAppSDK, v1.6.240923002:

SkiaSharp.Views.WinUI 3.0.0-nightly.263 - Not working SkiaSharp.Views.WinUI 3.0.0-nightly.265 and newer - Works SkiaSharp.Views.WinUI 3.0.0-preview.5.1 and newer - Works

I guess that it's not yet backported into SkiaSharp 2, since the latest nightly version (2.88.9-nightly.176) does not work.

beto-rodriguez commented 1 month ago

@mattleibow I read in another issue that this fix might not be ported to 2.x, is that true?

Mangepange commented 1 month ago

@beto-rodriguez Ouch, where did you see that information?

Bush-cat commented 1 month ago

Since that is still preview and SkiaSharp is stable, I cannot really depend on it for SkiaSharp 2.x. However, the 2.x branch does not have the convenient native library that I can use. I technically can add it to 2.x but that is a lot of work, and that old branch is very iffy to build. microsoft/CsWinRT#1645 (comment)

Mangepange commented 1 month ago

Does anybody know if there are any plans for when a stable version of SkiaSharp 3 is released?

ArpitViradiyaCrowncon commented 1 month ago

When SkiaSharp 3 is released?

Mangepange commented 1 month ago

When SkiaSharp 3 is released?

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

ArpitViradiyaCrowncon commented 1 month ago

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

So how can we resolved this issue?

Mangepange commented 1 month ago

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

So how can we resolved this issue?

See #2999. It's fixed in SkiaSharp 3.

ArpitViradiyaCrowncon commented 1 month ago

Yes, just wondering since it doesn't seems to be sure that the fix for this issue will be backported into v2.

So how can we resolved this issue?

See #2999. It's fixed in SkiaSharp 3.

I think that' for WinUi, I want for .Net maui. In nuget I can only show <PackageReference Include="LiveChartsCore.SkiaSharpView.Maui" Version="2.0.0-rc3.3" />

mattleibow commented 1 month ago

Closing this for now as the issue is fixed for both v2 and v3 in the latest preview.