summaryrefslogtreecommitdiff
path: root/vcl/inc/win/winlayout.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc/win/winlayout.hxx')
-rw-r--r--vcl/inc/win/winlayout.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx
index 19b5e0f9d9f8..456d371b52b8 100644
--- a/vcl/inc/win/winlayout.hxx
+++ b/vcl/inc/win/winlayout.hxx
@@ -72,28 +72,29 @@ struct GlobalGlyphCache
PackedTextureAtlasManager maPackedTextureAtlas;
std::unordered_set<GlyphCache*> maGlyphCaches;
+
+ static GlobalGlyphCache * get();
};
class GlyphCache
{
private:
- static std::unique_ptr<GlobalGlyphCache> gGlobalGlyphCache;
std::unordered_map<int, OpenGLGlyphDrawElement> maOpenGLTextureCache;
public:
GlyphCache()
{
- gGlobalGlyphCache.get()->maGlyphCaches.insert(this);
+ GlobalGlyphCache::get()->maGlyphCaches.insert(this);
}
~GlyphCache()
{
- gGlobalGlyphCache.get()->maGlyphCaches.erase(this);
+ GlobalGlyphCache::get()->maGlyphCaches.erase(this);
}
static bool ReserveTextureSpace(OpenGLGlyphDrawElement& rElement, int nWidth, int nHeight)
{
- GlobalGlyphCache* pGlobalGlyphCache = gGlobalGlyphCache.get();
+ GlobalGlyphCache* pGlobalGlyphCache = GlobalGlyphCache::get();
rElement.maTexture = pGlobalGlyphCache->maPackedTextureAtlas.Reserve(nWidth, nHeight);
if (!rElement.maTexture)
return false;