1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 10:47:25 +08:00

Merge pull request #10499 from peppy/beatmap-carousel-refactor-less-alloc-overhead

Reduce alloc overhead of DrawableCarouselBeatmapSet using new function-based ctor
This commit is contained in:
Dan Balasescu 2020-10-20 14:57:20 +09:00 committed by GitHub
commit 05db7538c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,11 +77,11 @@ namespace osu.Game.Screens.Select.Carousel
Header.Children = new Drawable[] 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, RelativeSizeAxes = Axes.Both,
}, 300), }, 300),
mainFlow = new DelayedLoadWrapper(new SetPanelContent((CarouselBeatmapSet)Item), 100), mainFlow = new DelayedLoadWrapper(() => new SetPanelContent((CarouselBeatmapSet)Item), 100),
}; };
background.DelayedLoadComplete += fadeContentIn; background.DelayedLoadComplete += fadeContentIn;