forked from organicmaps/organicmaps
Add flag when no current drawing country.
This commit is contained in:
parent
55a3ba9d19
commit
da7ef7e33d
2 changed files with 14 additions and 4 deletions
|
@ -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<di::DrawRule, reserve_rules_count> rules;
|
||||
buffer_vector<di::DrawRule, 16> 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -325,6 +325,8 @@ namespace fwork
|
|||
shared_ptr<PaintEvent> m_paintEvent;
|
||||
|
||||
int m_zoom;
|
||||
bool m_hasNonCoast;
|
||||
|
||||
yg::GlyphCache * m_glyphCache;
|
||||
|
||||
#ifdef PROFILER_DRAWING
|
||||
|
@ -335,8 +337,6 @@ namespace fwork
|
|||
|
||||
void PreProcessKeys(vector<drule::Key> & 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;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue