File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/Skia/Avalonia.Skia/Gpu/Vulkan Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Avalonia . Skia . Vulkan ;
9
9
10
- internal class VulkanSkiaGpu : ISkiaGpu
10
+ internal class VulkanSkiaGpu : ISkiaGpuWithPlatformGraphicsContext
11
11
{
12
12
private readonly VulkanSkiaExternalObjectsFeature ? _externalObjects ;
13
13
public IVulkanPlatformGraphicsContext Vulkan { get ; private set ; }
@@ -72,6 +72,9 @@ public void Dispose()
72
72
}
73
73
74
74
public bool IsLost => Vulkan . IsLost ;
75
+
76
+ public IPlatformGraphicsContext ? PlatformGraphicsContext => Vulkan ;
77
+
75
78
public IDisposable EnsureCurrent ( ) => Vulkan . EnsureCurrent ( ) ;
76
79
77
80
@@ -83,4 +86,7 @@ public ISkiaGpuRenderTarget TryCreateRenderTarget(IEnumerable<object> surfaces)
83
86
84
87
85
88
public ISkiaSurface ? TryCreateSurface ( PixelSize size , ISkiaGpuRenderSession ? session ) => null ;
86
- }
89
+
90
+ public IScopedResource < GRContext > TryGetGrContext ( ) =>
91
+ ScopedResource < GRContext > . Create ( GrContext , EnsureCurrent ( ) . Dispose ) ;
92
+ }
You can’t perform that action at this time.
0 commit comments