Merge pull request #7917 from RoosterDragon/replay-browser-load-perf

Faster replay browser loading
This commit is contained in:
Oliver Brakmann
2015-05-03 20:13:13 +02:00
7 changed files with 181 additions and 95 deletions

View File

@@ -162,10 +162,13 @@ namespace OpenRA.Mods.Common.Widgets
WidgetUtils.DrawRGBA(ChromeProvider.GetImage("scrollbar", downPressed || downDisabled ? "down_pressed" : "down_arrow"),
new float2(downButtonRect.Left + downOffset, downButtonRect.Top + downOffset));
Game.Renderer.EnableScissor(backgroundRect.InflateBy(-1, -1, -1, -1));
var drawBounds = backgroundRect.InflateBy(-1, -1, -1, -1);
Game.Renderer.EnableScissor(drawBounds);
drawBounds.Offset((-ChildOrigin).ToPoint());
foreach (var child in Children)
child.DrawOuter();
if (child.Bounds.IntersectsWith(drawBounds))
child.DrawOuter();
Game.Renderer.DisableScissor();
}