diff --git a/Dalamud/Interface/Internal/SharedImmediateTextures/FileSystemSharedImmediateTexture.cs b/Dalamud/Interface/Internal/SharedImmediateTextures/FileSystemSharedImmediateTexture.cs index 6504c72c0..734f2d0f4 100644 --- a/Dalamud/Interface/Internal/SharedImmediateTextures/FileSystemSharedImmediateTexture.cs +++ b/Dalamud/Interface/Internal/SharedImmediateTextures/FileSystemSharedImmediateTexture.cs @@ -44,6 +44,6 @@ internal sealed class FileSystemSharedImmediateTexture : SharedImmediateTexture private async Task CreateTextureAsync(CancellationToken cancellationToken) { var tm = await Service.GetAsync(); - return tm.NoThrottleGetFromImage(await File.ReadAllBytesAsync(this.path, cancellationToken)); + return tm.NoThrottleCreateFromImage(await File.ReadAllBytesAsync(this.path, cancellationToken)); } } diff --git a/Dalamud/Interface/Internal/SharedImmediateTextures/GamePathSharedImmediateTexture.cs b/Dalamud/Interface/Internal/SharedImmediateTextures/GamePathSharedImmediateTexture.cs index f1f35677e..8b97d04d2 100644 --- a/Dalamud/Interface/Internal/SharedImmediateTextures/GamePathSharedImmediateTexture.cs +++ b/Dalamud/Interface/Internal/SharedImmediateTextures/GamePathSharedImmediateTexture.cs @@ -50,6 +50,6 @@ internal sealed class GamePathSharedImmediateTexture : SharedImmediateTexture if (dm.GetFile(this.path) is not { } file) throw new FileNotFoundException(); cancellationToken.ThrowIfCancellationRequested(); - return tm.NoThrottleGetFromTexFile(file); + return tm.NoThrottleCreateFromTexFile(file); } } diff --git a/Dalamud/Interface/Internal/SharedImmediateTextures/ManifestResourceSharedImmediateTexture.cs b/Dalamud/Interface/Internal/SharedImmediateTextures/ManifestResourceSharedImmediateTexture.cs index de55a18f5..a249be80e 100644 --- a/Dalamud/Interface/Internal/SharedImmediateTextures/ManifestResourceSharedImmediateTexture.cs +++ b/Dalamud/Interface/Internal/SharedImmediateTextures/ManifestResourceSharedImmediateTexture.cs @@ -59,6 +59,6 @@ internal sealed class ManifestResourceSharedImmediateTexture : SharedImmediateTe var tm = await Service.GetAsync(); var ms = new MemoryStream(stream.CanSeek ? (int)stream.Length : 0); await stream.CopyToAsync(ms, cancellationToken); - return tm.NoThrottleGetFromImage(ms.GetBuffer().AsMemory(0, (int)ms.Length)); + return tm.NoThrottleCreateFromImage(ms.GetBuffer().AsMemory(0, (int)ms.Length)); } } diff --git a/Dalamud/Interface/Internal/TextureManager.cs b/Dalamud/Interface/Internal/TextureManager.cs index b0341f36c..6ad768e76 100644 --- a/Dalamud/Interface/Internal/TextureManager.cs +++ b/Dalamud/Interface/Internal/TextureManager.cs @@ -221,7 +221,7 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid CancellationToken cancellationToken = default) => this.textureLoadThrottler.CreateLoader( new TextureLoadThrottler.ReadOnlyThrottleBasisProvider(), - ct => Task.Run(() => this.NoThrottleGetFromImage(bytes.ToArray()), ct), + ct => Task.Run(() => this.NoThrottleCreateFromImage(bytes.ToArray()), ct), cancellationToken); /// @@ -339,7 +339,7 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid CancellationToken cancellationToken = default) => this.textureLoadThrottler.CreateLoader( new TextureLoadThrottler.ReadOnlyThrottleBasisProvider(), - ct => Task.Run(() => this.NoThrottleGetFromTexFile(file), ct), + ct => Task.Run(() => this.NoThrottleCreateFromTexFile(file), ct), cancellationToken); /// @@ -465,11 +465,11 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid } } - /// Gets a texture from the given image. Skips the load throttler; intended to be used from implementation - /// of s. + /// Creates a texture from the given bytes of an image file. Skips the load throttler; intended to be used + /// from implementation of s. /// The data. /// The loaded texture. - internal IDalamudTextureWrap NoThrottleGetFromImage(ReadOnlyMemory bytes) + internal IDalamudTextureWrap NoThrottleCreateFromImage(ReadOnlyMemory bytes) { ObjectDisposedException.ThrowIf(this.disposing, this); @@ -493,7 +493,7 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid // Note: FileInfo and FilePath are not used from TexFile; skip it. try { - return this.NoThrottleGetFromTexFile(tf); + return this.NoThrottleCreateFromTexFile(tf); } catch (Exception e) { @@ -506,11 +506,11 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid ?? throw texFileAttemptException ?? new("Failed to load image because of an unknown reason.")); } - /// Gets a texture from the given . Skips the load throttler; intended to be used from - /// implementation of s. + /// Creates a texture from the given . Skips the load throttler; intended to be used + /// from implementation of s. /// The data. /// The loaded texture. - internal IDalamudTextureWrap NoThrottleGetFromTexFile(TexFile file) + internal IDalamudTextureWrap NoThrottleCreateFromTexFile(TexFile file) { ObjectDisposedException.ThrowIf(this.disposing, this);