add render_flip to perf history

This commit is contained in:
Chris Forbes
2011-05-05 19:28:53 +12:00
parent fe392bd42d
commit f406504147
2 changed files with 8 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Graphics
scrollPosition = newScrollPosition;
}
private int2 NormalizeScrollPosition(int2 newScrollPosition)
int2 NormalizeScrollPosition(int2 newScrollPosition)
{
return newScrollPosition.Clamp(adjustedMapBounds);
}
@@ -97,7 +97,10 @@ namespace OpenRA.Graphics
Game.modData.Palette.GetPaletteIndex(cursorSequence.Palette));
}
renderer.EndFrame( inputHandler );
using( new PerfSample("render_flip") )
{
renderer.EndFrame( inputHandler );
}
}
public void Tick()
@@ -109,6 +112,7 @@ namespace OpenRA.Graphics
{
return (1f / Game.CellSize) * (loc.ToFloat2() + Location);
}
public float2 ViewToWorld(MouseInput mi)
{
return ViewToWorld(mi.Location);