TextureCache: Rename functions and add comments to clear up docs

This commit is contained in:
Scott Mansell 2016-06-18 03:28:57 +12:00
parent 94eaacae30
commit 96ab76f81d
2 changed files with 34 additions and 26 deletions

View file

@ -98,17 +98,24 @@ public:
// This texture entry is used by the other entry as a sub-texture
void CreateReference(TCacheEntryBase* other_entry)
{
// References are two-way, so they can easily be destroyed later
this->references.emplace(other_entry);
other_entry->references.emplace(this);
}
void DestroyAllReferences()
{
for (auto& reference : references)
reference->references.erase(this);
references.clear();
}
void SetEfbCopy(u32 stride);
void Reset(); // Prepare for reuse
TCacheEntryBase(const TCacheEntryConfig& c) : config(c) {}
virtual ~TCacheEntryBase();
virtual void Bind(unsigned int stage) = 0;
virtual bool Save(const std::string& filename, unsigned int level) = 0;
@ -179,7 +186,9 @@ private:
static TCacheEntryBase* AllocateTexture(const TCacheEntryConfig& config);
static TexCache::iterator GetTexCacheIter(TCacheEntryBase* entry);
static TexCache::iterator FreeTexture(TexCache::iterator t_iter);
// Removes and unlinks texture from texture cache and returns it to the pool
static TexCache::iterator InvalidateTexture(TexCache::iterator t_iter);
static TCacheEntryBase* ReturnEntry(unsigned int stage, TCacheEntryBase* entry);