diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2023-06-20 18:59:55 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2023-06-20 18:59:55 -0500 |
| commit | 2dc24a9148e1dc98ada6629fe6eebb673ceb336b (patch) | |
| tree | e6c261040aa44c6996c858bb38dfc1224f9c96f0 /Source/Core/VideoCommon/Assets | |
| parent | 5ad2d86cc7b0356b7ea04e5bc9e50013fdf5a3b4 (diff) | |
VideoCommon: move cached texture asset to 'CustomAsset' common code
Diffstat (limited to 'Source/Core/VideoCommon/Assets')
| -rw-r--r-- | Source/Core/VideoCommon/Assets/CustomAsset.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Assets/CustomAsset.h b/Source/Core/VideoCommon/Assets/CustomAsset.h index 563955188c..9a11a49365 100644 --- a/Source/Core/VideoCommon/Assets/CustomAsset.h +++ b/Source/Core/VideoCommon/Assets/CustomAsset.h @@ -85,4 +85,18 @@ protected: std::shared_ptr<UnderlyingType> m_data; }; +// A helper struct that contains +// an asset with a last cached write time +// This can be used to determine if the asset +// has diverged from the last known state +// To know if it is time to update other dependencies +// based on the asset data +// TODO C++20: use a 'derived_from' concept against 'CustomAsset' when available +template <typename AssetType> +struct CachedAsset +{ + std::shared_ptr<AssetType> m_asset; + VideoCommon::CustomAssetLibrary::TimeType m_cached_write_time; +}; + } // namespace VideoCommon |
