Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-02-07 13:35:48 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:11:19 +0300
commit9fbb9f2019f383ec1a39eaf2d8c5cd6c1886fb39 (patch)
treed05d7320553896ebd5c0f35129ac66a0530c229f /drape_frontend/tile_info.cpp
parent1917aca0bde2aa7f98a6f85eae76e471f81d362e (diff)
[drape] use upper style zoom for 18 and 19 zoom levels
also guard DoNeedReadIndex by mutex. is's need in situations when one tile info was push to back of thread pool, and than push to front and processed on separate threads in one time.
Diffstat (limited to 'drape_frontend/tile_info.cpp')
-rw-r--r--drape_frontend/tile_info.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/drape_frontend/tile_info.cpp b/drape_frontend/tile_info.cpp
index 1f8c05a4aa..4642428a39 100644
--- a/drape_frontend/tile_info.cpp
+++ b/drape_frontend/tile_info.cpp
@@ -43,11 +43,11 @@ namespace df
void TileInfo::ReadFeatureIndex(model::FeaturesFetcher const & model)
{
+ threads::MutexGuard guard(m_mutex);
if (DoNeedReadIndex())
{
- threads::MutexGuard guard(m_mutex);
CheckCanceled();
- model.ForEachFeatureID(GetGlobalRect(), *this, m_key.m_zoomLevel);
+ model.ForEachFeatureID(GetGlobalRect(), *this, GetZoomLevel());
sort(m_featureInfo.begin(), m_featureInfo.end());
}
}
@@ -91,7 +91,7 @@ namespace df
void TileInfo::InitStylist(const FeatureType & f, Stylist & s)
{
CheckCanceled();
- df::InitStylist(f, m_key.m_zoomLevel, s);
+ df::InitStylist(f, GetZoomLevel(), s);
}
//====================================================//
@@ -112,4 +112,10 @@ namespace df
if (m_isCanceled)
MYTHROW(ReadCanceledException, ());
}
+
+ int TileInfo::GetZoomLevel() const
+ {
+ int upperScale = scales::GetUpperScale();
+ return m_key.m_zoomLevel <= upperScale ? m_key.m_zoomLevel : upperScale;
+ }
}