From 0ee508bfa84d2695b08d46f52562192fcfcc4e1e Mon Sep 17 00:00:00 2001 From: Dariusz Komosinski Date: Mon, 9 Mar 2020 23:09:35 +0100 Subject: [PATCH] Fix CalendarBenchmark not working with new text layout. --- tests/Avalonia.Benchmarks/NullGlyphRun.cs | 11 +++++++++++ tests/Avalonia.Benchmarks/NullRenderingPlatform.cs | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/Avalonia.Benchmarks/NullGlyphRun.cs diff --git a/tests/Avalonia.Benchmarks/NullGlyphRun.cs b/tests/Avalonia.Benchmarks/NullGlyphRun.cs new file mode 100644 index 0000000000..5ba0822649 --- /dev/null +++ b/tests/Avalonia.Benchmarks/NullGlyphRun.cs @@ -0,0 +1,11 @@ +using Avalonia.Platform; + +namespace Avalonia.Benchmarks +{ + internal class NullGlyphRun : IGlyphRunImpl + { + public void Dispose() + { + } + } +} diff --git a/tests/Avalonia.Benchmarks/NullRenderingPlatform.cs b/tests/Avalonia.Benchmarks/NullRenderingPlatform.cs index 101d40f00a..1f983069c2 100644 --- a/tests/Avalonia.Benchmarks/NullRenderingPlatform.cs +++ b/tests/Avalonia.Benchmarks/NullRenderingPlatform.cs @@ -72,7 +72,9 @@ namespace Avalonia.Benchmarks public IGlyphRunImpl CreateGlyphRun(GlyphRun glyphRun, out double width) { - throw new NotImplementedException(); + width = default; + + return new NullGlyphRun(); } } }