浏览代码

Fix CalendarBenchmark not working with new text layout.

Dariusz Komosinski 5 年之前
父节点
当前提交
0ee508bfa8
共有 2 个文件被更改,包括 14 次插入1 次删除
  1. 11 0
      tests/Avalonia.Benchmarks/NullGlyphRun.cs
  2. 3 1
      tests/Avalonia.Benchmarks/NullRenderingPlatform.cs

+ 11 - 0
tests/Avalonia.Benchmarks/NullGlyphRun.cs

@@ -0,0 +1,11 @@
+using Avalonia.Platform;
+
+namespace Avalonia.Benchmarks
+{
+    internal class NullGlyphRun : IGlyphRunImpl
+    {
+        public void Dispose()
+        {
+        }
+    }
+}

+ 3 - 1
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();
         }
     }
 }