fix things
This commit is contained in:
Родитель
dc1b8a36ab
Коммит
20640cba3b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче