1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 10:02:59 +08:00

Reduce alloc overhead of DrawableCarouselBeatmapSet using new function-based ctor

This commit is contained in:
Dean Herbert 2020-10-14 15:10:50 +09:00
parent e662dc5342
commit 30e1fce7a4

View File

@ -77,11 +77,11 @@ namespace osu.Game.Screens.Select.Carousel
Header.Children = new Drawable[]
{
background = new DelayedLoadWrapper(new SetPanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
background = new DelayedLoadWrapper(() => new SetPanelBackground(manager.GetWorkingBeatmap(beatmapSet.Beatmaps.FirstOrDefault()))
{
RelativeSizeAxes = Axes.Both,
}, 300),
mainFlow = new DelayedLoadWrapper(new SetPanelContent((CarouselBeatmapSet)Item), 100),
mainFlow = new DelayedLoadWrapper(() => new SetPanelContent((CarouselBeatmapSet)Item), 100),
};
background.DelayedLoadComplete += fadeContentIn;