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

Method Frame

libs/drape/overlay_tree.cpp:108–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108bool OverlayTree::Frame()
109{
110 if (IsNeedUpdate())
111 return true;
112
113 // Choose optimal frame update period.
114 if (m_frameCounter == 0)
115 {
116 auto const handlesCount = m_handlesCache.size();
117 if (handlesCount > kMaxHandlesCount)
118 m_frameUpdatePeriod = kMaxFrameUpdatePeriod;
119 else if (handlesCount < kMinHandlesCount)
120 m_frameUpdatePeriod = kMinFrameUpdatePeriod;
121 else
122 m_frameUpdatePeriod = kAvgFrameUpdatePeriod;
123 }
124
125 m_frameCounter++;
126 if (m_frameCounter >= static_cast<int>(m_frameUpdatePeriod))
127 InvalidateOnNextFrame();
128
129 return IsNeedUpdate();
130}
131
132bool OverlayTree::IsNeedUpdate() const
133{

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected