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:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-06-18 14:08:33 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:08:39 +0300
commit65f06ea218b40fecaefbaad51302b5b8f579dac3 (patch)
tree1d560973f8e62db55a9a65a6b573ed2d70b6b79b /drape/texture_manager.hpp
parent06ba3c8c3e23fe9660fde7d77dbae8969bef7331 (diff)
Added asynchronous SDF glyphs generation
Diffstat (limited to 'drape/texture_manager.hpp')
-rw-r--r--drape/texture_manager.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/drape/texture_manager.hpp b/drape/texture_manager.hpp
index 9ba687ec8f..c6bda89f61 100644
--- a/drape/texture_manager.hpp
+++ b/drape/texture_manager.hpp
@@ -89,7 +89,7 @@ public:
/// On some devices OpenGL driver can't resolve situation when we upload on texture from one thread
/// and use this texture to render on other thread. By this we move UpdateDynamicTextures call into render thread
/// If you implement some kind of dynamic texture, you must synchronyze UploadData and index creation operations
- void UpdateDynamicTextures();
+ bool UpdateDynamicTextures();
private:
struct GlyphGroup
@@ -196,6 +196,16 @@ private:
g.m_texture->UpdateState();
}
+ template<typename TGlyphGroups>
+ bool HasAsyncRoutines(TGlyphGroups & groups)
+ {
+ for (auto & g : groups)
+ if (g.m_texture != nullptr && g.m_texture->HasAsyncRoutines())
+ return true;
+
+ return false;
+ }
+
static constexpr size_t GetInvalidGlyphGroup();
private: