This commit is contained in:
Matthew Leibowitz 2022-01-19 01:35:50 +02:00
Родитель dc1b8a36ab
Коммит 20640cba3b
3 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -24,6 +24,12 @@ namespace Microsoft.Maui.Graphics.Skia
static SkiaCanvasStateService CreateStateService(out SkiaCanvasStateService stateService) =>
stateService = new SkiaCanvasStateService();
public override void Dispose()
{
_stateService.Dispose();
base.Dispose();
}
public override float DisplayScale => _displayScale;
public SKCanvas Canvas

Просмотреть файл

@ -5,9 +5,9 @@ namespace Microsoft.Maui.Graphics.Skia
{
public class SkiaCanvasStateService : IDisposable, ICanvasStateService<SkiaCanvasState>
{
private static SKPaint _defaultFillPaint;
private static SKPaint _defaultFontPaint;
private static SKPaint _defaultStrokePaint;
private SKPaint _defaultFillPaint;
private SKPaint _defaultFontPaint;
private SKPaint _defaultStrokePaint;
public SkiaCanvasState CreateNew(object context)
{

Просмотреть файл

@ -26,6 +26,12 @@ namespace Microsoft.Maui.Graphics.Platform
static PlatformCanvasStateService CreateStateService(out PlatformCanvasStateService stateService) =>
stateService = new PlatformCanvasStateService();
public override void Dispose()
{
_stateService.Dispose();
base.Dispose();
}
public Canvas Canvas
{
get => _canvas;