1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:47:52 +08:00

Recreate beatmap video on each consumption

Should not be shared over multiple usages
This commit is contained in:
Dean Herbert 2019-09-14 00:07:06 +09:00
parent 1b8d5decfa
commit 65aa7b2016

View File

@ -44,7 +44,6 @@ namespace osu.Game.Beatmaps
track = new RecyclableLazy<Track>(() => GetTrack() ?? GetVirtualTrack());
background = new RecyclableLazy<Texture>(GetBackground, BackgroundStillValid);
video = new RecyclableLazy<VideoSprite>(GetVideo);
waveform = new RecyclableLazy<Waveform>(GetWaveform);
storyboard = new RecyclableLazy<Storyboard>(GetStoryboard);
skin = new RecyclableLazy<ISkin>(GetSkin);
@ -188,11 +187,9 @@ namespace osu.Game.Beatmaps
protected abstract Texture GetBackground();
private readonly RecyclableLazy<Texture> background;
public bool VideoLoaded => video.IsResultAvailable;
public VideoSprite Video => video.Value;
public VideoSprite Video => GetVideo();
protected abstract VideoSprite GetVideo();
private readonly RecyclableLazy<VideoSprite> video;
public bool TrackLoaded => track.IsResultAvailable;
public Track Track => track.Value;