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

Method GetAttributeMutation

libs/drape_frontend/circles_pack_shape.cpp:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void CirclesPackHandle::GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutator) const
76{
77 if (!m_needUpdate)
78 return;
79
80 TOffsetNode const & node = GetOffsetNode(kDynamicStreamID);
81 ASSERT_EQUAL(node.first.GetElementSize(), sizeof(CirclesPackDynamicVertex), ());
82 ASSERT_EQUAL(node.second.m_count, m_buffer.size(), ());
83
84 uint32_t const bytesCount = static_cast<uint32_t>(m_buffer.size()) * sizeof(CirclesPackDynamicVertex);
85 void * buffer = mutator->AllocateMutationBuffer(bytesCount);
86 memcpy(buffer, m_buffer.data(), bytesCount);
87
88 dp::MutateNode mutateNode;
89 mutateNode.m_region = node.second;
90 mutateNode.m_data = make_ref(buffer);
91 mutator->AddMutation(node.first, mutateNode);
92
93 m_needUpdate = false;
94}
95
96bool CirclesPackHandle::Update(ScreenBase const & screen)
97{

Callers

nothing calls this directly

Calls 6

make_refFunction · 0.85
AddMutationMethod · 0.80
GetElementSizeMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected