IDisplayView, render statistics

This commit is contained in:
2023-08-12 23:42:44 +02:00
parent 09f44e9db2
commit a594e1b989
9 changed files with 63 additions and 18 deletions

View File

@@ -13,20 +13,30 @@ public readonly ref struct RenderContext
public readonly bool ForceRerender;
public readonly IColor? Foreground;
public readonly IColor? Background;
public readonly RenderStatistics Statistics;
public RenderContext(
IConsoleDriver consoleDriver,
bool forceRerender,
IColor? foreground,
IColor? background)
IConsoleDriver consoleDriver,
bool forceRerender,
IColor? foreground,
IColor? background,
RenderStatistics statistics)
{
RenderId = _renderId++;
ConsoleDriver = consoleDriver;
ForceRerender = forceRerender;
Foreground = foreground;
Background = background;
Statistics = statistics;
}
public static RenderContext Empty => new(null!, false, null, null);
public static RenderContext Empty =>
new(
null!,
false,
null,
null,
new RenderStatistics()
);
}