diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2015-05-05 18:34:18 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2015-11-30 16:07:41 +0300 |
commit | f39751dfa80eeb96bfb914558195c246a4e68ed2 (patch) | |
tree | 84970fd2713dd3cde13c05bce233da6f65953494 /drape_frontend/base_renderer.hpp | |
parent | 3d945a950c0024eb34931a0a6fc7d7b8f9c5c56b (diff) |
[drape] move navigator on frontend renderer
Diffstat (limited to 'drape_frontend/base_renderer.hpp')
-rw-r--r-- | drape_frontend/base_renderer.hpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/drape_frontend/base_renderer.hpp b/drape_frontend/base_renderer.hpp index f0c1661f20..4cde6295c4 100644 --- a/drape_frontend/base_renderer.hpp +++ b/drape_frontend/base_renderer.hpp @@ -5,6 +5,7 @@ #include "drape_frontend/tile_utils.hpp" #include "drape/oglcontextfactory.hpp" +#include "drape/texture_manager.hpp" #include "base/thread.hpp" @@ -19,17 +20,30 @@ namespace df class BaseRenderer : public MessageAcceptor { public: - using TCompletionHandler = function<void()>; - - BaseRenderer(ThreadsCommutator::ThreadName name, - ref_ptr<ThreadsCommutator> commutator, - ref_ptr<dp::OGLContextFactory> oglcontextfactory); + struct Params + { + Params(ref_ptr<ThreadsCommutator> commutator, + ref_ptr<dp::OGLContextFactory> factory, + ref_ptr<dp::TextureManager> texMng) + : m_commutator(commutator) + , m_oglContextFactory(factory) + , m_texMng(texMng) + { + } + + ref_ptr<ThreadsCommutator> m_commutator; + ref_ptr<dp::OGLContextFactory> m_oglContextFactory; + ref_ptr<dp::TextureManager> m_texMng; + }; + + BaseRenderer(ThreadsCommutator::ThreadName name, Params const & params); void SetRenderingEnabled(bool const isEnabled); protected: ref_ptr<ThreadsCommutator> m_commutator; ref_ptr<dp::OGLContextFactory> m_contextFactory; + ref_ptr<dp::TextureManager> m_texMng; void StartThread(); void StopThread(); @@ -42,6 +56,8 @@ protected: private: bool CanReceiveMessage() override; + using TCompletionHandler = function<void()>; + private: threads::Thread m_selfThread; ThreadsCommutator::ThreadName m_threadName; |