Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drape/font_texture.hpp4
-rw-r--r--drape/texture.hpp2
-rw-r--r--drape/texture_manager.cpp8
-rw-r--r--drape/texture_manager.hpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/drape/font_texture.hpp b/drape/font_texture.hpp
index 7790d2213c..4b120ccfa9 100644
--- a/drape/font_texture.hpp
+++ b/drape/font_texture.hpp
@@ -152,9 +152,9 @@ public:
~FontTexture() { TBase::Reset(); }
- bool IsFull(uint32_t newKeysCount) const override
+ bool HasEnoughSpace(uint32_t newKeysCount) const override
{
- return !m_index.CanBeGlyphPacked(newKeysCount);
+ return m_index.CanBeGlyphPacked(newKeysCount);
}
bool HasAsyncRoutines() const override
diff --git a/drape/texture.hpp b/drape/texture.hpp
index b59834920b..83d9e26c1f 100644
--- a/drape/texture.hpp
+++ b/drape/texture.hpp
@@ -51,7 +51,7 @@ public:
virtual ref_ptr<ResourceInfo> FindResource(Key const & key, bool & newResource) = 0;
virtual void UpdateState() {}
virtual bool HasAsyncRoutines() const { return false; }
- virtual bool IsFull(uint32_t newKeysCount) const { return false; }
+ virtual bool HasEnoughSpace(uint32_t newKeysCount) const { return true; }
using Params = HWTexture::Params;
diff --git a/drape/texture_manager.cpp b/drape/texture_manager.cpp
index 46e333d97c..9fd92dd856 100644
--- a/drape/texture_manager.cpp
+++ b/drape/texture_manager.cpp
@@ -335,12 +335,12 @@ size_t TextureManager::FindHybridGlyphsGroup(strings::UniString const & text)
}
HybridGlyphGroup & group = m_hybridGlyphGroups.back();
- bool isFull = false;
+ bool hasEnoughSpace = true;
if (group.m_texture != nullptr)
- isFull = group.m_texture->IsFull(text.size());
+ hasEnoughSpace = group.m_texture->HasEnoughSpace(text.size());
// if we have got the only hybrid texture (in most cases it is) we can omit checking of glyphs usage
- if (!isFull)
+ if (hasEnoughSpace)
{
size_t const glyphsCount = group.m_glyphs.size() + text.size();
if (m_hybridGlyphGroups.size() == 1 && glyphsCount < m_maxGlypsCount)
@@ -355,7 +355,7 @@ size_t TextureManager::FindHybridGlyphsGroup(strings::UniString const & text)
// check if we can contain text in the last hybrid texture
size_t const unfoundChars = GetNumberOfUnfoundCharacters(text, group);
size_t const newCharsCount = group.m_glyphs.size() + unfoundChars;
- if (newCharsCount >= m_maxGlypsCount || group.m_texture->IsFull(unfoundChars))
+ if (newCharsCount >= m_maxGlypsCount || !group.m_texture->HasEnoughSpace(unfoundChars))
m_hybridGlyphGroups.push_back(HybridGlyphGroup());
return m_hybridGlyphGroups.size() - 1;
diff --git a/drape/texture_manager.hpp b/drape/texture_manager.hpp
index c8be6d6566..f25a9bbb5d 100644
--- a/drape/texture_manager.hpp
+++ b/drape/texture_manager.hpp
@@ -191,7 +191,7 @@ private:
{
GlyphGroup & group = m_glyphGroups[groupIndex];
uint32_t const absentGlyphs = GetAbsentGlyphsCount(group.m_texture, text);
- if (group.m_texture == nullptr || !group.m_texture->IsFull(absentGlyphs))
+ if (group.m_texture == nullptr || group.m_texture->HasEnoughSpace(absentGlyphs))
FillResults<GlyphGroup>(text, buffers, group);
else
useHybridGroup = true;