From d8ded147e3192d1a001912f2ed39034eeffd9b06 Mon Sep 17 00:00:00 2001 From: Daria Volvenkova Date: Wed, 20 Feb 2019 15:16:25 +0300 Subject: [PATCH] [vulkan] Fixed glyph generation. --- drape/font_texture.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drape/font_texture.cpp b/drape/font_texture.cpp index b19dd1a45c..03f7444358 100644 --- a/drape/font_texture.cpp +++ b/drape/font_texture.cpp @@ -166,7 +166,7 @@ ref_ptr GlyphIndex::MapResource(GlyphKey const & key, boo GlyphManager::Glyph glyph = m_mng->GetGlyph(key.GetUnicodePoint(), key.GetFixedSize()); m2::RectU r; - if (!glyph.m_metrics.m_isValid || !m_packer.PackGlyph(glyph.m_image.m_width, glyph.m_image.m_height, r)) + if (!m_packer.PackGlyph(glyph.m_image.m_width, glyph.m_image.m_height, r)) { glyph.m_image.Destroy(); if (glyph.m_metrics.m_isValid) @@ -180,8 +180,7 @@ ref_ptr GlyphIndex::MapResource(GlyphKey const & key, boo auto invalidGlyphIndex = m_index.find(GlyphKey(invalidGlyph.m_code, key.GetFixedSize())); if (invalidGlyphIndex != m_index.end()) { - generationData.m_glyph = invalidGlyph; - generationData.m_rect = r; + newResource = false; return make_ref(&invalidGlyphIndex->second); }