Make IDalamudTextureWrap ICloneable

This commit is contained in:
Soreepeong 2024-02-25 21:21:50 +09:00
parent c1c85e5236
commit f6be80a5fb
6 changed files with 145 additions and 32 deletions

View file

@ -62,7 +62,7 @@ internal class InterfaceManager : IDisposable, IServiceType
/// </summary>
public const float DefaultFontSizePx = (DefaultFontSizePt * 4.0f) / 3.0f;
private readonly ConcurrentBag<DalamudTextureWrap> deferredDisposeTextures = new();
private readonly ConcurrentBag<IDeferredDisposable> deferredDisposeTextures = new();
private readonly ConcurrentBag<ILockedImFont> deferredDisposeImFontLockeds = new();
[ServiceManager.ServiceDependency]
@ -402,7 +402,7 @@ internal class InterfaceManager : IDisposable, IServiceType
/// Enqueue a texture to be disposed at the end of the frame.
/// </summary>
/// <param name="wrap">The texture.</param>
public void EnqueueDeferredDispose(DalamudTextureWrap wrap)
public void EnqueueDeferredDispose(IDeferredDisposable wrap)
{
this.deferredDisposeTextures.Add(wrap);
}