Browse Source

Use IRendererFactory in framebuffer backend.

If an `IRendererFactory` is provided, use this to supply the renderer; otherwise fall back to the existing `DeferredRenderer`.
pull/6652/head
Steven Kirk 5 years ago
parent
commit
49e23bc07f
  1. 9
      src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs

9
src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs

@ -30,10 +30,9 @@ namespace Avalonia.LinuxFramebuffer
public IRenderer CreateRenderer(IRenderRoot root)
{
return new DeferredRenderer(root, AvaloniaLocator.Current.GetService<IRenderLoop>())
{
};
var factory = AvaloniaLocator.Current.GetService<IRendererFactory>();
var renderLoop = AvaloniaLocator.Current.GetService<IRenderLoop>();
return factory?.Create(root, renderLoop) ?? new DeferredRenderer(root, renderLoop);
}
public void Dispose()
@ -41,7 +40,7 @@ namespace Avalonia.LinuxFramebuffer
throw new NotSupportedException();
}
public void Invalidate(Rect rect)
{
}

Loading…
Cancel
Save