| 73 | } |
| 74 | |
| 75 | void 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 | |
| 96 | bool CirclesPackHandle::Update(ScreenBase const & screen) |
| 97 | { |
nothing calls this directly
no test coverage detected