MCPcopy Create free account
hub / github.com/comaps/comaps / PushTaskBackForTileKey

Method PushTaskBackForTileKey

libs/drape_frontend/read_manager.cpp:217–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void ReadManager::PushTaskBackForTileKey(TileKey const & tileKey, ref_ptr<dp::TextureManager> texMng,
218 ref_ptr<MetalineManager> metalineMng)
219{
220 ASSERT(m_pool != nullptr, ());
221 auto context = make_unique_dp<EngineContext>(TileKey(tileKey, m_generationCounter, m_userMarksGenerationCounter),
222 m_commutator, texMng, metalineMng, m_customFeaturesContext,
223 m_have3dBuildings && m_allow3dBuildings, m_trafficEnabled,
224 m_isolinesEnabled, m_mapLangIndex);
225 std::shared_ptr<TileInfo> tileInfo = std::make_shared<TileInfo>(std::move(context));
226 m_tileInfos.insert(tileInfo);
227
228 /// @todo Do we really need ReadMWMTask pool? Avoid "new" with hand-written bicycle? ;)
229 ReadMWMTask * task = m_tasksPool.Get();
230
231 task->Init(tileInfo);
232 /// @todo Can we update m_activeTiles once like IncreaseCounter and lock mutex once?
233 /// Or order is important here?
234 {
235 std::lock_guard lock(m_finishedTilesMutex);
236 m_activeTiles.insert(TileKey(tileKey, m_generationCounter, m_userMarksGenerationCounter));
237 }
238 m_pool->PushBack(task);
239}
240
241void ReadManager::CheckFinishedTiles(TTileInfoCollection const & requestedTiles, bool forceUpdateUserMarks)
242{

Callers

nothing calls this directly

Calls 6

ASSERTFunction · 0.85
TileKeyClass · 0.70
insertMethod · 0.45
GetMethod · 0.45
InitMethod · 0.45
PushBackMethod · 0.45

Tested by

no test coverage detected