Add ITextureProvider.CreateTextureFromSeString

This commit is contained in:
Soreepeong 2025-07-01 19:02:32 +09:00
parent d3bd5f1dce
commit c19ea6ace3
19 changed files with 629 additions and 215 deletions

View file

@ -238,12 +238,17 @@ internal abstract class FontHandle : IFontHandle
}
/// <inheritdoc/>
public Task<IFontHandle> WaitAsync()
public Task<IFontHandle> WaitAsync() => this.WaitAsync(CancellationToken.None);
/// <inheritdoc/>
public Task<IFontHandle> WaitAsync(CancellationToken cancellationToken)
{
if (this.Available)
return Task.FromResult<IFontHandle>(this);
var tcs = new TaskCompletionSource<IFontHandle>(TaskCreationOptions.RunContinuationsAsynchronously);
cancellationToken.Register(() => tcs.TrySetCanceled());
this.ImFontChanged += OnImFontChanged;
this.Disposed += OnDisposed;
if (this.Available)