Remove CancellationToken from GetFromRaw(Sync)

This commit is contained in:
Soreepeong 2024-02-22 16:53:13 +09:00
parent 80875247b6
commit 3bf907002f
2 changed files with 3 additions and 6 deletions

View file

@ -265,8 +265,7 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid
/// <inheritdoc/>
public IDalamudTextureWrap GetFromRaw(
RawImageSpecification specs,
ReadOnlySpan<byte> bytes,
CancellationToken cancellationToken = default) =>
ReadOnlySpan<byte> bytes) =>
this.interfaceManager.LoadImageFromDxgiFormat(
bytes,
specs.Pitch,
@ -281,7 +280,7 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid
CancellationToken cancellationToken = default) =>
this.textureLoadThrottler.CreateLoader(
new TextureLoadThrottler.ReadOnlyThrottleBasisProvider(),
ct => Task.FromResult(this.GetFromRaw(specs, bytes.Span, ct)),
ct => Task.FromResult(this.GetFromRaw(specs, bytes.Span)),
cancellationToken);
/// <inheritdoc/>

View file

@ -152,12 +152,10 @@ public partial interface ITextureProvider
/// <summary>Gets a texture from the given bytes, interpreting it as a raw bitmap.</summary>
/// <param name="specs">The specifications for the raw bitmap.</param>
/// <param name="bytes">The bytes to load.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The texture loaded from the supplied raw bitmap. Dispose after use.</returns>
IDalamudTextureWrap GetFromRaw(
RawImageSpecification specs,
ReadOnlySpan<byte> bytes,
CancellationToken cancellationToken = default);
ReadOnlySpan<byte> bytes);
/// <summary>Gets a texture from the given bytes, interpreting it as a raw bitmap.</summary>
/// <param name="specs">The specifications for the raw bitmap.</param>