diff --git a/externals/skia b/externals/skia index d8d50cf9f9..226016281e 160000 --- a/externals/skia +++ b/externals/skia @@ -1 +1 @@ -Subproject commit d8d50cf9f9372a50e8405a422b193e11f566f511 +Subproject commit 226016281e15b4171ab982462fe84234e73fe326 diff --git a/tests/SkiaSharp.Tests.Devices/Tests/iOS/iOSExtensionsTests.cs b/tests/SkiaSharp.Tests.Devices/Tests/iOS/iOSExtensionsTests.cs index a0e8c55f29..51398d4bed 100644 --- a/tests/SkiaSharp.Tests.Devices/Tests/iOS/iOSExtensionsTests.cs +++ b/tests/SkiaSharp.Tests.Devices/Tests/iOS/iOSExtensionsTests.cs @@ -1,5 +1,7 @@ -using CoreGraphics; +using System; +using CoreGraphics; using Foundation; +using Metal; using Xunit; namespace SkiaSharp.Views.iOS.Tests @@ -99,5 +101,21 @@ public void CGRectToSKRect(int x, int y, int w, int h) Assert.Equal(expected, actual); } + + [SkippableFact] + public void GRContextDisposeDoesNotCrash() + { + var device = MTLDevice.SystemDefault!; + Skip.If(device == null, "Metal is not supported on this device."); + + using var commandQueue = device.CreateCommandQueue(); + using var backendContext = new GRMtlBackendContext() + { + Device = device, + Queue = commandQueue, + }; + + using var context = GRContext.CreateMetal(backendContext); + } } }