From 3bf907002f9fc09d73a67c583e0c120cca296f4e Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Thu, 22 Feb 2024 16:53:13 +0900 Subject: [PATCH] Remove CancellationToken from GetFromRaw(Sync) --- Dalamud/Interface/Internal/TextureManager.cs | 5 ++--- Dalamud/Plugin/Services/ITextureProvider.cs | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dalamud/Interface/Internal/TextureManager.cs b/Dalamud/Interface/Internal/TextureManager.cs index 7789e9e76..462a5ec76 100644 --- a/Dalamud/Interface/Internal/TextureManager.cs +++ b/Dalamud/Interface/Internal/TextureManager.cs @@ -265,8 +265,7 @@ internal sealed class TextureManager : IServiceType, IDisposable, ITextureProvid /// public IDalamudTextureWrap GetFromRaw( RawImageSpecification specs, - ReadOnlySpan bytes, - CancellationToken cancellationToken = default) => + ReadOnlySpan 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); /// diff --git a/Dalamud/Plugin/Services/ITextureProvider.cs b/Dalamud/Plugin/Services/ITextureProvider.cs index c314d7392..b6c7e2cbd 100644 --- a/Dalamud/Plugin/Services/ITextureProvider.cs +++ b/Dalamud/Plugin/Services/ITextureProvider.cs @@ -152,12 +152,10 @@ public partial interface ITextureProvider /// Gets a texture from the given bytes, interpreting it as a raw bitmap. /// The specifications for the raw bitmap. /// The bytes to load. - /// The cancellation token. /// The texture loaded from the supplied raw bitmap. Dispose after use. IDalamudTextureWrap GetFromRaw( RawImageSpecification specs, - ReadOnlySpan bytes, - CancellationToken cancellationToken = default); + ReadOnlySpan bytes); /// Gets a texture from the given bytes, interpreting it as a raw bitmap. /// The specifications for the raw bitmap.