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

Method UpdateCanBeDeletedStatus

libs/drape_frontend/frontend_renderer.cpp:244–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244void FrontendRenderer::UpdateCanBeDeletedStatus()
245{
246 m2::RectD const & screenRect = m_userEventStream.GetCurrentScreen().ClipRect();
247
248 std::vector<m2::RectD> notFinishedTileRects;
249 notFinishedTileRects.reserve(m_notFinishedTiles.size());
250 for (auto const & tileKey : m_notFinishedTiles)
251 notFinishedTileRects.push_back(tileKey.GetGlobalRect());
252
253 for (RenderLayer & layer : m_layers)
254 {
255 for (auto & group : layer.m_renderGroups)
256 {
257 if (!group->IsPendingOnDelete())
258 continue;
259
260 bool canBeDeleted = true;
261 if (!notFinishedTileRects.empty())
262 {
263 m2::RectD const tileRect = group->GetTileKey().GetGlobalRect();
264 if (tileRect.IsIntersect(screenRect))
265 canBeDeleted = !HasIntersection(tileRect, notFinishedTileRects);
266 }
267 layer.m_isDirty |= group->UpdateCanBeDeletedStatus(canBeDeleted, GetCurrentZoom(), make_ref(m_overlayTree));
268 }
269 }
270}
271
272void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
273{

Callers

nothing calls this directly

Calls 10

HasIntersectionFunction · 0.85
make_refFunction · 0.85
GetCurrentScreenMethod · 0.80
IsPendingOnDeleteMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
GetGlobalRectMethod · 0.45
emptyMethod · 0.45
IsIntersectMethod · 0.45

Tested by

no test coverage detected