示例#1
0
        public static void Initialize(SkiaOptions options)
        {
            //var customGpu = options.CustomGpuFactory?.Invoke();
            //var renderInterface = new PlatformRenderInterface(customGpu);

            //AvaloniaLocator.CurrentMutable
            //    .Bind<IPlatformRenderInterface>().ToConstant(renderInterface);
        }
示例#2
0
        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());
        }
示例#3
0
        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);
        }