Support sending sequences of points when drawing lines.
This allows the graph widgets to avoid having to create temporary arrays just to draw these lines, which reduces GC pressure.
This commit is contained in:
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
foreach (var item in PerfHistory.Items.Values)
|
||||
{
|
||||
cr.DrawLine(item.Samples()
|
||||
.Select((sample, i) => origin + new float2(i, (float)sample) * basis).ToArray(),
|
||||
.Select((sample, i) => origin + new float2(i, (float)sample) * basis),
|
||||
1, item.C);
|
||||
|
||||
var u = new float2(rect.Left, rect.Top);
|
||||
|
||||
Reference in New Issue
Block a user