| 95 | } |
| 96 | |
| 97 | void 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 | |
| 128 | void RenderBucket::SetFeatureMinZoom(int minZoom) |
| 129 | { |
nothing calls this directly
no test coverage detected