Add methods to support sequential resource destruction

This commit is contained in:
Jack Andersen 2016-02-24 11:20:33 -10:00
parent 0e9011be2f
commit c9631253a2
2 changed files with 7 additions and 0 deletions

View File

@ -191,6 +191,8 @@ public:
void closeBuiltinFonts() {m_regFace.close(); m_monoFace.close(); m_curvesFace.close();}
const FontAtlas& lookupAtlas(FontTag tag) const;
void destroyAtlases() {m_cachedAtlases.clear();}
};
}

View File

@ -188,6 +188,11 @@ public:
ViewResources& operator=(const ViewResources& other) = delete;
ViewResources& operator=(ViewResources&& other) = default;
void destroyResData()
{
m_resData.doDestroy();
}
~ViewResources()
{
if (m_fcacheThread.joinable())