-
Notifications
You must be signed in to change notification settings - Fork 597
Open
Labels
area/SkiaSharp.Views.MauiIssues relating to the views for .NET MAUI mobile/desktop applications.Issues relating to the views for .NET MAUI mobile/desktop applications.os/iOStenet/reliabilityIssues relating to crashes or unexpected behaviorsIssues relating to crashes or unexpected behaviorstype/bug
Description
Description
We got a bug report with this error using the Mapsui MapControl with the latest SkiaSharp in MAUI running on .NET 10 (not in .NET 9).
I did not investigate this myself but there is not a lot of our own code involved. This is our Mapsui MapControl with all relevant code: https://github.com/Mapsui/Mapsui/blob/main/Mapsui.UI.Maui/MapControl.cs
Code
Some code from our MapControl.
private void OnGLPaintSurface(object? sender, SKPaintGLSurfaceEventArgs args)
{
if (_glView?.GRContext is null)
{
// Could this be null before Home is called? If so we should change the logic.
Logger.Log(LogLevel.Warning, "Refresh can not be called because GRContext is null");
return;
}
// Called on UI thread
PaintSurface(args.Surface.Canvas);
}
private void OnPaintSurface(object? sender, SKPaintSurfaceEventArgs args)
{
// Called on UI thread
PaintSurface(args.Surface.Canvas);
}
private void PaintSurface(SKCanvas canvas)
{
if (GetPixelDensity() is not float pixelDensity)
return;
canvas.Scale(pixelDensity, pixelDensity);
_renderController?.Render(canvas);
}
Expected Behavior
No error and something rendered.
Actual Behavior
No error and a white canvas.
Version of SkiaSharp
3.116.0 (Current)
Last Known Good Version of SkiaSharp
2.88.9 (Previous)
IDE / Editor
Visual Studio (macOS)
Platform / Operating System
iOS
Platform / Operating System Version
iOS.
Devices
Dunno
Relevant Screenshots
No response
Relevant Log Output
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area/SkiaSharp.Views.MauiIssues relating to the views for .NET MAUI mobile/desktop applications.Issues relating to the views for .NET MAUI mobile/desktop applications.os/iOStenet/reliabilityIssues relating to crashes or unexpected behaviorsIssues relating to crashes or unexpected behaviorstype/bug
Type
Projects
Status
New