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

Method Render

libs/drape/render_bucket.cpp:97–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void RenderBucket::Render(ref_ptr<GraphicsContext> context, bool drawAsLine)
98{
99 ASSERT(m_buffer != nullptr, ());
100
101 if (!m_overlay.empty())
102 {
103 // in simple case when overlay is symbol each element will be contains 6 indexes
104 AttributeBufferMutator attributeMutator;
105 IndexBufferMutator indexMutator(static_cast<uint32_t>(6 * m_overlay.size()));
106 ref_ptr<IndexBufferMutator> rfpIndex = make_ref(&indexMutator);
107 ref_ptr<AttributeBufferMutator> rfpAttrib = make_ref(&attributeMutator);
108
109 bool hasIndexMutation = false;
110 for (drape_ptr<OverlayHandle> const & handle : m_overlay)
111 {
112 if (handle->IndexesRequired())
113 {
114 if (handle->IsVisible())
115 handle->GetElementIndexes(rfpIndex);
116 hasIndexMutation = true;
117 }
118
119 if (handle->HasDynamicAttributes())
120 handle->GetAttributeMutation(rfpAttrib);
121 }
122
123 m_buffer->ApplyMutation(context, hasIndexMutation ? rfpIndex : nullptr, rfpAttrib);
124 }
125 m_buffer->Render(context, drawAsLine);
126}
127
128void RenderBucket::SetFeatureMinZoom(int minZoom)
129{

Callers

nothing calls this directly

Calls 10

ASSERTFunction · 0.85
make_refFunction · 0.85
GetElementIndexesMethod · 0.80
HasDynamicAttributesMethod · 0.80
ApplyMutationMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
IndexesRequiredMethod · 0.45
IsVisibleMethod · 0.45
GetAttributeMutationMethod · 0.45

Tested by

no test coverage detected