public static void Initialize()
        {
            var renderInterface = new PlatformRenderInterface();

            AvaloniaLocator.CurrentMutable
            .Bind <IPlatformRenderInterface>().ToConstant(renderInterface);
        }
Esempio n. 2
0
        public static void Initialize(SkiaOptions options)
        {
            var customGpu       = options.CustomGpuFactory?.Invoke();
            var renderInterface = new PlatformRenderInterface(customGpu);

            AvaloniaLocator.CurrentMutable
            .Bind <IPlatformRenderInterface>().ToConstant(renderInterface);
        }
Esempio n. 3
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());
        }