diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-12-30 16:06:16 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:35:48 +0300 |
commit | 5d3977bebd9fb7e68c7eec158e5ca06385372a5e (patch) | |
tree | 6990c3dc548a11c9f6ebb1faae04cc0ce1d670a0 /drape/symbols_texture.cpp | |
parent | 8649b4e94cd701f124cb23b72dde6c8802fb7bb2 (diff) |
[drape] from now in drape we will use strong texturing model without texture sets.
- remove texture sets (controller and sets), applying and managing
- improve memory allocations for resources
- rewrite font texture for dynamic glyph mapping
- fragmentation unicode block on textures
- some minor stuff
Diffstat (limited to 'drape/symbols_texture.cpp')
-rw-r--r-- | drape/symbols_texture.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drape/symbols_texture.cpp b/drape/symbols_texture.cpp index 6ca2f73627..c75062d26b 100644 --- a/drape/symbols_texture.cpp +++ b/drape/symbols_texture.cpp @@ -14,7 +14,7 @@ namespace dp class SymbolsTexture::DefinitionLoader { public: - DefinitionLoader(SymbolsTexture::tex_definition_t & definition) + DefinitionLoader(SymbolsTexture::TSymDefinition & definition) : m_def(definition) , m_width(0) , m_height(0) @@ -79,7 +79,7 @@ public: uint32_t GetHeight() const { return m_height; } private: - SymbolsTexture::tex_definition_t & m_def; + SymbolsTexture::TSymDefinition & m_def; uint32_t m_width; uint32_t m_height; @@ -161,16 +161,16 @@ void SymbolsTexture::Load(string const & skinPathName) stbi_image_free(data); } -Texture::ResourceInfo const * SymbolsTexture::FindResource(Texture::Key const & key) const +RefPointer<Texture::ResourceInfo> SymbolsTexture::FindResource(Texture::Key const & key) const { if (key.GetType() != Texture::Symbol) - return NULL; + return RefPointer<ResourceInfo>(); string const & symbolName = static_cast<SymbolKey const &>(key).GetSymbolName(); - tex_definition_t::const_iterator it = m_definition.find(symbolName); + TSymDefinition::iterator it = m_definition.find(symbolName); ASSERT(it != m_definition.end(), ()); - return &(it->second); + return MakeStackRefPointer<ResourceInfo>(&it->second); } void SymbolsTexture::Fail() |