| 31 | {} |
| 32 | |
| 33 | void TextHandle::GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutator) const |
| 34 | { |
| 35 | bool const isVisible = IsVisible(); |
| 36 | if (!m_forceUpdateNormals && m_isLastVisible == isVisible) |
| 37 | return; |
| 38 | |
| 39 | TOffsetNode const & node = GetOffsetNode(gpu::TextDynamicVertex::GetDynamicStreamID()); |
| 40 | ASSERT(node.first.GetElementSize() == sizeof(gpu::TextDynamicVertex), ()); |
| 41 | ASSERT(node.second.m_count == m_buffer.size(), ()); |
| 42 | |
| 43 | uint32_t const byteCount = static_cast<uint32_t>(m_buffer.size()) * sizeof(gpu::TextDynamicVertex); |
| 44 | void * buffer = mutator->AllocateMutationBuffer(byteCount); |
| 45 | if (isVisible) |
| 46 | memcpy(buffer, m_buffer.data(), byteCount); |
| 47 | else |
| 48 | memset(buffer, 0, byteCount); |
| 49 | |
| 50 | dp::MutateNode mutateNode; |
| 51 | mutateNode.m_region = node.second; |
| 52 | mutateNode.m_data = make_ref(buffer); |
| 53 | mutator->AddMutation(node.first, mutateNode); |
| 54 | |
| 55 | m_isLastVisible = isVisible; |
| 56 | } |
| 57 | |
| 58 | bool TextHandle::Update(ScreenBase const & screen) |
| 59 | { |
nothing calls this directly
no test coverage detected