public GRBackendTexture(int width, int height, bool mipmapped, GRMtlTextureInfo mtlInfo) : this(IntPtr.Zero, true) { var info = mtlInfo.ToNative(); Handle = SkiaApi.gr_backendtexture_new_metal(width, height, mipmapped, &info); if (Handle == IntPtr.Zero) { throw new InvalidOperationException("Unable to create a new GRBackendTexture instance."); } }
public GRBackendRenderTarget(int width, int height, int sampleCount, GRMtlTextureInfo mtlInfo) : this(IntPtr.Zero, true) { var info = mtlInfo.ToNative(); Handle = SkiaApi.gr_backendrendertarget_new_metal(width, height, sampleCount, &info); if (Handle == IntPtr.Zero) { throw new InvalidOperationException("Unable to create a new GRBackendRenderTarget instance."); } }