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:
authorExMix <rahuba.youri@mapswithme.com>2015-02-08 19:33:22 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:04:02 +0300
commit4520ae129f44865974191cdaf9d5c57628c6ee16 (patch)
treed1a0660091823e258b883edbb4559302644444a7 /drape/texture_manager.hpp
parent5befdce1ec1c90e0824be29a023acae10d698245 (diff)
[drape] move upload dynamic resource into renderer thread to avoid ogl driver synchronization bug on Lenovo k900
Diffstat (limited to 'drape/texture_manager.hpp')
-rw-r--r--drape/texture_manager.hpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/drape/texture_manager.hpp b/drape/texture_manager.hpp
index 68a41b39f7..798212a9b2 100644
--- a/drape/texture_manager.hpp
+++ b/drape/texture_manager.hpp
@@ -66,13 +66,18 @@ public:
void Init(Params const & params);
void Release();
- void GetSymbolRegion(string const & symbolName, SymbolRegion & region) const;
+ void GetSymbolRegion(string const & symbolName, SymbolRegion & region);
+
typedef buffer_vector<uint8_t, 8> TStipplePattern;
- void GetStippleRegion(TStipplePattern const & pen, StippleRegion & region) const;
- void GetColorRegion(Color const & color, ColorRegion & region) const;
+ void GetStippleRegion(TStipplePattern const & pen, StippleRegion & region);
+ void GetColorRegion(Color const & color, ColorRegion & region);
typedef buffer_vector<GlyphRegion, 32> TGlyphsBuffer;
- void GetGlyphRegions(strings::UniString const & text, TGlyphsBuffer & regions) const;
+ void GetGlyphRegions(strings::UniString const & text, TGlyphsBuffer & regions);
+
+ /// On some devices OpenGL driver can't resolve situation when we upload on texture from on 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();
private:
@@ -91,6 +96,7 @@ private:
uint32_t m_maxTextureSize;
void AllocateGlyphTexture(TextureManager::GlyphGroup & group) const;
+ void GetRegionBase(RefPointer<Texture> tex, TextureManager::BaseRegion & region, Texture::Key const & key);
private:
MasterPointer<Texture> m_symbolTexture;
@@ -99,8 +105,10 @@ private:
MasterPointer<GlyphManager> m_glyphManager;
- mutable buffer_vector<GlyphGroup, 64> m_glyphGroups;
- mutable buffer_vector<MasterPointer<Texture>, 4> m_hybridGlyphGroups;
+ buffer_vector<GlyphGroup, 64> m_glyphGroups;
+ buffer_vector<MasterPointer<Texture>, 4> m_hybridGlyphGroups;
+
+ volatile bool m_hasPendingUpdates = false;
};
} // namespace dp