Skip to content

Update SkiaSharp to 3.119, Svg.Skia to 3.0.0, HarfBuzzSharp to 8.3.1.1, Uno to 6.0.130 and CommunityToolkit.Mvvm to 8.4.0 #3031

Merged
pauldendulk merged 14 commits intoMapsui:mainfrom
inforithmics:UnoV6
Jun 16, 2025
Merged

Update SkiaSharp to 3.119, Svg.Skia to 3.0.0, HarfBuzzSharp to 8.3.1.1, Uno to 6.0.130 and CommunityToolkit.Mvvm to 8.4.0 #3031
pauldendulk merged 14 commits intoMapsui:mainfrom
inforithmics:UnoV6

Conversation

@inforithmics
Copy link
Contributor

@inforithmics inforithmics commented Jun 15, 2025

Please summarize your PR and explain which problem it solves.

  • Updates Uno to Version 6.0.130
  • Updates SkiaSharp to 3.119 (Needed by Uno 6.0.130)
  • Updated to Svg.Skia 3.0.0 (based on SkiaSharp 3.x)
  • Fixed Bug in MapControl WinUI:
    SharedConstructor should only be called after Canvas Initialization. Because else the First InvalidateCanvas crashes because the _canvas is not set yet.

@inforithmics inforithmics changed the title WIP Uno 6.0.130 Uno 6.0.130 Jun 15, 2025
@inforithmics inforithmics changed the title Uno 6.0.130 WIP Uno 6.0.130 Jun 16, 2025
@inforithmics inforithmics changed the title WIP Uno 6.0.130 Uno 6.0.130 Jun 16, 2025
}

// The Canvas needs to be first set before calling the Shared Constructor or else it crashes in the InvalidateCanvas
SharedConstructor();
Copy link
Contributor Author

@inforithmics inforithmics Jun 16, 2025

Choose a reason for hiding this comment

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

I had to move it here or it crashed on my computer with _canvas not initilized in InitCanvas(); I think this could be a problem on other platforms too. But I think this should be then a seperate pull request.

Copy link
Member

@pauldendulk pauldendulk Jun 16, 2025

Choose a reason for hiding this comment

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

Yes it is. I was just looking into this because of another bug report I got.

Copy link
Member

@pauldendulk pauldendulk left a comment

Choose a reason for hiding this comment

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

Great!

I just have some questions.

-->
<UnoFeatures>
</UnoFeatures>
SkiaRenderer;
Copy link
Member

Choose a reason for hiding this comment

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

What does the UnoFeatures SkiaRenderer do? It uses SkiaRendering instead of something else? Which platforms does it affect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SkiaRenderer is now the default on Uno 6.0. I'll investigate if this is needed in the Control. My guess is that this setting only works on an WinUI Application, because only in the WinUI Sample the references changed when I enabled this. But nothing changed in the MapControl.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed in the Control too, It adds some more dependencies (But only in the Wasm Targets)

Copy link

Choose a reason for hiding this comment

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

I don't think you should be using SkiaRenderer here - it will make it stop working on native renderers. The correct thing to do is leave it off unless you only want to support skia.

Copy link

@mikernet mikernet Jul 9, 2025

Choose a reason for hiding this comment

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

Note that #if ANDROID blocks won't have any effect when a non-skia library is used on skia renderer app though.

LiveCharts2 renders using skia and it works on both native and skia renderers, might be worth having a look at what they did?

Copy link
Member

Choose a reason for hiding this comment

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

@mikernet There #if ANDROID was removed, so that is a good thing?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think you should be using SkiaRenderer here - it will make it stop working on native renderers. The correct thing to do is leave it off unless you only want to support skia.

To 'support skia' means that the entire interface is rendered to a skia canvas, right? And from your url I understand that this is the default for Android and iOS fro Uno 6, but apparently it is just an option. So, the question is what Mapsui should support, or what it needs to do to support both.

Copy link

Choose a reason for hiding this comment

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

@pauldendulk Sorry, that was slightly confusing phrasing from me. For a library to support both uno native and uno skia renderers (where the whole app is rendered to a skia canvas), the library itself should not use the SkiaRenderer feature. The controls in the library itself can render to a skia surface I believe, as apparently evidenced by LiveCharts2 working fine on both, but not sure what caveats that entails.

GC.SuppressFinalize(this);
}
#else
#if __ANDROID__
Copy link
Member

Choose a reason for hiding this comment

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

Ghd #if ANDROID is not relevant anymore. Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The dispose in Android is now too only Dispose() without (boolean) Parameter so making an #if Android compilation made no sense anymore because it is the same code as the #else case.

Copy link
Member

@pauldendulk pauldendulk left a comment

Choose a reason for hiding this comment

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

Approving this. The questions can be answered later. I want to release this fix soon.

@pauldendulk pauldendulk merged commit eb04f4b into Mapsui:main Jun 16, 2025
5 checks passed
@pauldendulk pauldendulk changed the title Uno 6.0.130 Update to Uno 6.0.130 Jun 16, 2025
@pauldendulk pauldendulk changed the title Update to Uno 6.0.130 Update SkiaSharp to 3.119, Svg.Skia to 3.0.0, HarfBuzzSharp to 8.3.1.1, Uno to 6.0.130 and CommunityToolkit.Mvvm to 8.4.0 Jun 16, 2025
@inforithmics inforithmics deleted the UnoV6 branch June 16, 2025 22:01
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.

3 participants