diff --git a/base/threaded_list.hpp b/base/threaded_list.hpp index 5f7243c1ac..d078fdb5c5 100644 --- a/base/threaded_list.hpp +++ b/base/threaded_list.hpp @@ -108,7 +108,7 @@ public: return m_list.size(); } - bool Empty() + bool Empty() const { threads::ConditionGuard g(m_Cond); return m_list.empty(); diff --git a/map/framework.cpp b/map/framework.cpp index 4019dc14d9..f6e2983fe6 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -244,7 +244,7 @@ void Framework::SetMaxWorldRect() template bool Framework::NeedRedraw() const { - return m_windowHandle->needRedraw(); + return m_windowHandle->needRedraw() || m_renderPolicy->NeedRedraw(); } template diff --git a/map/partial_render_policy.cpp b/map/partial_render_policy.cpp index c92c30d56e..fbc6482820 100644 --- a/map/partial_render_policy.cpp +++ b/map/partial_render_policy.cpp @@ -88,4 +88,8 @@ void PartialRenderPolicy::DrawFrame(shared_ptr const & paintEvent, RenderPolicyMT::DrawFrame(paintEvent, screenBase); // OGLCHECK(glFinish()); + +bool PartialRenderPolicy::NeedRedraw() const +{ + return !m_glQueue.Empty(); } diff --git a/map/partial_render_policy.hpp b/map/partial_render_policy.hpp index fe4aebd1de..3cdfe6c7f9 100644 --- a/map/partial_render_policy.hpp +++ b/map/partial_render_policy.hpp @@ -29,4 +29,6 @@ public: void DrawFrame(shared_ptr const & paintEvent, ScreenBase const & screenBase); + + bool NeedRedraw() const; }; diff --git a/map/render_policy.cpp b/map/render_policy.cpp index e458c4a5d5..e739e231b6 100644 --- a/map/render_policy.cpp +++ b/map/render_policy.cpp @@ -98,3 +98,8 @@ bool RenderPolicy::DoSupportRotation() const { return m_doSupportRotation; } + +bool RenderPolicy::NeedRedraw() const +{ + return false; +} diff --git a/map/render_policy.hpp b/map/render_policy.hpp index 0f09f54125..f1749509e0 100644 --- a/map/render_policy.hpp +++ b/map/render_policy.hpp @@ -76,4 +76,6 @@ public: /// @} bool DoSupportRotation() const; + + bool NeedRedraw() const; };