diff --git a/map/draw_processor.cpp b/map/draw_processor.cpp index 92a5dd689d..9dfb05a287 100644 --- a/map/draw_processor.cpp +++ b/map/draw_processor.cpp @@ -9,6 +9,7 @@ #include "../indexer/feature_visibility.hpp" #include "../indexer/drawing_rules.hpp" #include "../indexer/feature_data.hpp" +#include "../indexer/feature_impl.hpp" #include "../std/bind.hpp" @@ -212,6 +213,7 @@ namespace fwork m_convertor(convertor), m_paintEvent(e), m_zoom(scaleLevel), + m_hasNonCoast(false), m_glyphCache(e->drawer()->screen()->glyphCache()) #ifdef PROFILER_DRAWING , m_drawCount(0) @@ -272,6 +274,8 @@ namespace fwork if (!m_coasts.insert(s1).second) return true; } + else + m_hasNonCoast = true; // remove duplicating identical drawing keys PreProcessKeys(keys); @@ -282,7 +286,7 @@ namespace fwork m_drawCount += count; #endif - buffer_vector rules; + buffer_vector rules; rules.resize(count); int layer = f.GetLayer(); @@ -401,4 +405,9 @@ namespace fwork return true; } + + bool DrawProcessor::IsEmptyDrawing() const + { + return (m_zoom >= feature::g_arrCountryScales[0] && !m_hasNonCoast); + } } diff --git a/map/draw_processor.hpp b/map/draw_processor.hpp index 6e552314ce..45bbd3c0f9 100644 --- a/map/draw_processor.hpp +++ b/map/draw_processor.hpp @@ -325,6 +325,8 @@ namespace fwork shared_ptr m_paintEvent; int m_zoom; + bool m_hasNonCoast; + yg::GlyphCache * m_glyphCache; #ifdef PROFILER_DRAWING @@ -335,8 +337,6 @@ namespace fwork void PreProcessKeys(vector & keys) const; - static const int reserve_rules_count = 16; - public: DrawProcessor(m2::RectD const & r, @@ -345,6 +345,7 @@ namespace fwork int scaleLevel); bool operator() (FeatureType const & f); + + bool IsEmptyDrawing() const; }; } -