1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:47:20 +08:00

Merge pull request #3392 from peppy/online-texture-improvements

Use LargeTextureStore for all online texture retrieval
This commit is contained in:
Dan Balasescu 2018-09-10 12:02:16 +09:00 committed by GitHub
commit f0a9801944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 10 deletions

View File

@ -108,7 +108,9 @@ namespace osu.Game
dependencies.Cache(contextFactory = new DatabaseContextFactory(Host.Storage));
dependencies.Cache(new LargeTextureStore(new TextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures"))));
var largeStore = new LargeTextureStore(new TextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures")));
largeStore.AddStore(new TextureLoaderStore(new OnlineStore()));
dependencies.Cache(largeStore);
dependencies.CacheAs(this);
dependencies.Cache(LocalConfig);

View File

@ -104,8 +104,6 @@ namespace osu.Game.Overlays.Direct
beatmaps.ItemAdded += setAdded;
}
public override bool DisposeOnDeathRemoval => true;
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);

View File

@ -118,9 +118,9 @@ namespace osu.Game.Overlays.MedalSplash
}
[BackgroundDependencyLoader]
private void load(OsuColour colours, TextureStore textures)
private void load(OsuColour colours, TextureStore textures, LargeTextureStore largeTextures)
{
medalSprite.Texture = textures.Get(medal.ImageUrl);
medalSprite.Texture = largeTextures.Get(medal.ImageUrl);
medalGlow.Texture = textures.Get(@"MedalSplash/medal-glow");
description.Colour = colours.BlueLight;
}

View File

@ -176,7 +176,7 @@ namespace osu.Game.Overlays.Profile.Header
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load(LargeTextureStore textures)
{
Child = new Sprite
{

View File

@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Profile.Sections.Recent
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load(LargeTextureStore textures)
{
sprite.Texture = textures.Get(url);
}

View File

@ -368,7 +368,7 @@ namespace osu.Game.Screens.Ranking
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load(LargeTextureStore textures)
{
if (!string.IsNullOrEmpty(user.CoverUrl))
cover.Texture = textures.Get(user.CoverUrl);

View File

@ -24,7 +24,7 @@ namespace osu.Game.Users
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load(LargeTextureStore textures)
{
if (textures == null)
throw new ArgumentNullException(nameof(textures));

View File

@ -18,7 +18,7 @@ namespace osu.Game.Users
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load(LargeTextureStore textures)
{
if (textures == null)
throw new ArgumentNullException(nameof(textures));