diff --git a/src/Gtk/Avalonia.Gtk/GtkPlatform.cs b/src/Gtk/Avalonia.Gtk/GtkPlatform.cs index aaeba75b50..38bada2f25 100644 --- a/src/Gtk/Avalonia.Gtk/GtkPlatform.cs +++ b/src/Gtk/Avalonia.Gtk/GtkPlatform.cs @@ -28,7 +28,7 @@ namespace Avalonia.Gtk using Rendering; using Gtk = global::Gtk; - public class GtkPlatform : IPlatformThreadingInterface, IPlatformSettings, IWindowingPlatform, IPlatformIconLoader + public class GtkPlatform : IPlatformThreadingInterface, IPlatformSettings, IWindowingPlatform, IPlatformIconLoader, IRendererFactory { private static readonly GtkPlatform s_instance = new GtkPlatform(); private static Thread _uiThread; @@ -54,6 +54,7 @@ namespace Avalonia.Gtk .Bind().ToConstant(GtkMouseDevice.Instance) .Bind().ToConstant(s_instance) .Bind().ToConstant(s_instance) + .Bind().ToConstant(s_instance) .Bind().ToConstant(new DefaultRenderLoop(60)) .Bind().ToSingleton() .Bind().ToConstant(s_instance); @@ -112,6 +113,11 @@ namespace Avalonia.Gtk return new PopupImpl(); } + public IRenderer CreateRenderer(IRenderRoot root, IRenderLoop renderLoop) + { + return new Renderer(root, renderLoop); + } + public IWindowIconImpl LoadIcon(string fileName) { return new IconImpl(new Gdk.Pixbuf(fileName));