diff --git a/Dalamud/Interface/Textures/ISharedImmediateTexture.cs b/Dalamud/Interface/Textures/ISharedImmediateTexture.cs index f9683e6c5..d93d97bb2 100644 --- a/Dalamud/Interface/Textures/ISharedImmediateTexture.cs +++ b/Dalamud/Interface/Textures/ISharedImmediateTexture.cs @@ -20,6 +20,8 @@ public interface ISharedImmediateTexture /// An instance of that is guaranteed to be available for the current /// frame being drawn. /// + /// Do not cache the result of this function across draw calls for different frames. + /// s may be cached, but the performance benefit will be minimal. /// Calling outside the main thread will fail. /// This function does not throw. /// will be ignored. @@ -35,6 +37,8 @@ public interface ISharedImmediateTexture /// An instance of that is guaranteed to be available for the current /// frame being drawn. /// + /// Do not cache the result of this function across draw calls for different frames. + /// s may be cached, but the performance benefit will be minimal. /// Calling outside the main thread will fail. /// This function does not throw. /// will be ignored. @@ -50,6 +54,8 @@ public interface ISharedImmediateTexture /// true if points to the loaded texture; false if the texture is /// still being loaded, or the load has failed. /// + /// Do not cache the result of this function across draw calls for different frames. + /// s may be cached, but the performance benefit will be minimal. /// Calling outside the main thread will fail. /// This function does not throw. /// on the returned will be ignored. diff --git a/Dalamud/Plugin/Services/ITextureProvider.cs b/Dalamud/Plugin/Services/ITextureProvider.cs index 5ebcb6145..74ebcea1a 100644 --- a/Dalamud/Plugin/Services/ITextureProvider.cs +++ b/Dalamud/Plugin/Services/ITextureProvider.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Reflection; @@ -189,6 +189,7 @@ public interface ITextureProvider /// /// This function is under the effect of . /// This function does not throw exceptions. + /// Caching the returned object is not recommended. Performance benefit will be minimal. /// ISharedImmediateTexture GetFromGameIcon(in GameIconLookup lookup); @@ -198,20 +199,27 @@ public interface ITextureProvider /// /// This function is under the effect of . /// This function does not throw exceptions. + /// Caching the returned object is not recommended. Performance benefit will be minimal. /// ISharedImmediateTexture GetFromGame(string path); /// Gets a shared texture corresponding to the given file on the filesystem. /// A path to a file on the filesystem. /// The shared texture that you may use to obtain the loaded texture wrap and load states. - /// This function does not throw exceptions. + /// + /// This function does not throw exceptions. + /// Caching the returned object is not recommended. Performance benefit will be minimal. + /// ISharedImmediateTexture GetFromFile(string path); /// Gets a shared texture corresponding to the given file of the assembly manifest resources. /// The assembly containing manifest resources. /// The case-sensitive name of the manifest resource being requested. /// The shared texture that you may use to obtain the loaded texture wrap and load states. - /// This function does not throw exceptions. + /// + /// This function does not throw exceptions. + /// Caching the returned object is not recommended. Performance benefit will be minimal. + /// ISharedImmediateTexture GetFromManifestResource(Assembly assembly, string name); /// Get a path for a specific icon's .tex file.