Browse Source
Merge pull request #7887 from ltetak/feature/skia_crash_on_exit
Suppress static SKFont finalizer to prevent crashes on app exit
pull/7888/head
Benedikt Stebner
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
src/Skia/Avalonia.Skia/PlatformRenderInterface.cs
|
|
|
@ -35,6 +35,9 @@ namespace Avalonia.Skia |
|
|
|
var gl = AvaloniaLocator.Current.GetService<IPlatformOpenGlInterface>(); |
|
|
|
if (gl != null) |
|
|
|
_skiaGpu = new GlSkiaGpu(gl, maxResourceBytes); |
|
|
|
|
|
|
|
//TODO: SKFont crashes when disposed in finalizer so we keep it alive
|
|
|
|
GC.SuppressFinalize(s_font); |
|
|
|
} |
|
|
|
|
|
|
|
public IGeometryImpl CreateEllipseGeometry(Rect rect) => new EllipseGeometryImpl(rect); |
|
|
|
|