diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2019-05-13 16:06:43 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2019-05-17 18:45:59 +0300 |
commit | 1a69dca9aa33328c43d293cff461a012e01ac826 (patch) | |
tree | 2c55019ab4d26a72f25c069f685610c1620d2a98 /drape_frontend/message_subclasses.hpp | |
parent | 0922584825bc153c50506890c1e9ba778fbd25d8 (diff) |
[drape] Fixed update map style
Diffstat (limited to 'drape_frontend/message_subclasses.hpp')
-rw-r--r-- | drape_frontend/message_subclasses.hpp | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/drape_frontend/message_subclasses.hpp b/drape_frontend/message_subclasses.hpp index 3b39737f1b..bb732f61d4 100644 --- a/drape_frontend/message_subclasses.hpp +++ b/drape_frontend/message_subclasses.hpp @@ -433,6 +433,7 @@ public: {} Type GetType() const override { return Type::MapShapes; } + bool ContainsRenderState() const override { return true; } bool IsGraphicsContextDependent() const override { return true; } drape_ptr<MyPosition> && AcceptShape() { return std::move(m_shape); } @@ -719,11 +720,23 @@ private: class SwitchMapStyleMessage : public BaseBlockingMessage { public: - explicit SwitchMapStyleMessage(Blocker & blocker) + using FilterMessagesHandler = std::function<void()>; + + SwitchMapStyleMessage(Blocker & blocker, FilterMessagesHandler && filterMessagesHandler) : BaseBlockingMessage(blocker) + , m_filterMessagesHandler(std::move(filterMessagesHandler)) {} Type GetType() const override { return Type::SwitchMapStyle; } + + void FilterDependentMessages() + { + if (m_filterMessagesHandler) + m_filterMessagesHandler(); + } + +private: + FilterMessagesHandler m_filterMessagesHandler; }; class InvalidateMessage : public Message @@ -944,7 +957,7 @@ class NotifyGraphicsReadyMessage : public Message public: using GraphicsReadyCallback = std::function<void()>; - NotifyGraphicsReadyMessage(GraphicsReadyCallback const & callback) + explicit NotifyGraphicsReadyMessage(GraphicsReadyCallback const & callback) : m_callback(callback) {} @@ -1296,6 +1309,19 @@ public: Type GetType() const override { return Type::FinishTexturesInitialization; } }; +class CleanupTexturesMessage : public Message +{ +public: + explicit CleanupTexturesMessage(std::vector<drape_ptr<dp::HWTexture>> && textures) + : m_textures(std::move(textures)) + {} + Type GetType() const override { return Type::CleanupTextures; } + bool IsGraphicsContextDependent() const override { return true; } + +private: + std::vector<drape_ptr<dp::HWTexture>> m_textures; +}; + class ShowDebugInfoMessage : public Message { public: |