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

Method EndOverlayPlacing

libs/drape/overlay_tree.cpp:335–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void OverlayTree::EndOverlayPlacing()
336{
337 ASSERT(IsNeedUpdate(), ());
338
339 m_displacers.clear();
340
341#ifdef DEBUG_OVERLAYS_OUTPUT
342 LOG(LINFO, ("- BEGIN OVERLAYS PLACING"));
343#endif
344
345 HandleComparator comparator(false /* enableMask */);
346
347 for (int rank = 0; rank < dp::OverlayRanksCount; rank++)
348 {
349 std::sort(m_handles[rank].begin(), m_handles[rank].end(), comparator);
350
351 for (auto const & handle : m_handles[rank])
352 {
353 ref_ptr<OverlayHandle> parentOverlay;
354 if (CheckHandle(handle, rank, parentOverlay))
355 InsertHandle(handle, rank, parentOverlay);
356 }
357 }
358
359 for (int rank = 0; rank < dp::OverlayRanksCount; rank++)
360 {
361 for (auto const & handle : m_handles[rank])
362 handle->SetDisplayFlag(false);
363 m_handles[rank].clear();
364 }
365
366 for (auto const & handle : m_handlesCache)
367 {
368 handle->SetDisplayFlag(true);
369 handle->SetIsVisible(true);
370 handle->EnableCaching(false);
371 }
372
373 m_frameCounter = 0;
374
375#ifdef DEBUG_OVERLAYS_OUTPUT
376 LOG(LINFO, ("- END OVERLAYS PLACING"));
377#endif
378}
379
380bool OverlayTree::CheckHandle(ref_ptr<OverlayHandle> handle, int currentRank,
381 ref_ptr<OverlayHandle> & parentOverlay) const

Callers 1

EndUpdateOverlayTreeMethod · 0.80

Calls 7

ASSERTFunction · 0.85
SetDisplayFlagMethod · 0.80
EnableCachingMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
SetIsVisibleMethod · 0.45

Tested by

no test coverage detected