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()); }
public static void Initialize(SkiaOptions options) { var customGpu = options.CustomGpuFactory?.Invoke(); var renderInterface = new PlatformRenderInterface(customGpu); AvaloniaLocator.CurrentMutable .Bind <IPlatformRenderInterface>().ToConstant(renderInterface); var fontManager = new FontManagerImpl(); AvaloniaLocator.CurrentMutable .Bind <IFontManagerImpl>().ToConstant(fontManager); }