public static void Initialize() { var renderInterface = new PlatformRenderInterface(); AvaloniaLocator.CurrentMutable .Bind <IPlatformRenderInterface>().ToConstant(renderInterface); }
public static void Initialize(SkiaOptions options) { var customGpu = options.CustomGpuFactory?.Invoke(); var renderInterface = new PlatformRenderInterface(customGpu); AvaloniaLocator.CurrentMutable .Bind <IPlatformRenderInterface>().ToConstant(renderInterface); }
public static void Initialize(SkiaOptions options) { var customGpu = options.CustomGpuFactory?.Invoke(); var renderInterface = new PlatformRenderInterface(customGpu, options.MaxGpuResourceSizeBytes); AvaloniaLocator.CurrentMutable .Bind <IPlatformRenderInterface>().ToConstant(renderInterface) .Bind <IFontManagerImpl>().ToConstant(new FontManagerImpl()) .Bind <ITextShaperImpl>().ToConstant(new TextShaperImpl()); }