mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Apply IRenderer changes
This commit is contained in:
@ -10,7 +10,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.OpenGL.Textures;
|
||||
using osu.Framework.Graphics.Rendering;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.Backgrounds;
|
||||
@ -28,11 +28,9 @@ namespace osu.Game.Tests.Visual.Background
|
||||
[Resolved]
|
||||
private SessionStatics statics { get; set; }
|
||||
|
||||
[Cached(typeof(LargeTextureStore))]
|
||||
private LookupLoggingTextureStore textureStore = new LookupLoggingTextureStore();
|
||||
|
||||
private DummyAPIAccess dummyAPI => (DummyAPIAccess)API;
|
||||
|
||||
private LookupLoggingTextureStore textureStore;
|
||||
private SeasonalBackgroundLoader backgroundLoader;
|
||||
private Container backgroundContainer;
|
||||
|
||||
@ -46,14 +44,22 @@ namespace osu.Game.Tests.Visual.Background
|
||||
};
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(LargeTextureStore wrappedStore)
|
||||
private void load(IRenderer renderer, LargeTextureStore wrappedStore)
|
||||
{
|
||||
textureStore = new LookupLoggingTextureStore(renderer);
|
||||
textureStore.AddStore(wrappedStore);
|
||||
|
||||
Add(backgroundContainer = new Container
|
||||
Child = new DependencyProvidingContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
});
|
||||
CachedDependencies = new (Type, object)[]
|
||||
{
|
||||
(typeof(LargeTextureStore), textureStore)
|
||||
},
|
||||
Child = backgroundContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
@ -193,6 +199,11 @@ namespace osu.Game.Tests.Visual.Background
|
||||
{
|
||||
public List<string> PerformedLookups { get; } = new List<string>();
|
||||
|
||||
public LookupLoggingTextureStore(IRenderer renderer)
|
||||
: base(renderer)
|
||||
{
|
||||
}
|
||||
|
||||
public override Texture Get(string name, WrapMode wrapModeS, WrapMode wrapModeT)
|
||||
{
|
||||
PerformedLookups.Add(name);
|
||||
|
Reference in New Issue
Block a user