MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ clear()

void MayaFlux::Kakshya::TextureContainer::clear ( )
overridevirtual

Clear all data in the container.

Implements MayaFlux::Kakshya::NDDataContainer< DataVariant >.

Definition at line 819 of file TextureContainer.cpp.

820{
821 const size_t element_count = static_cast<size_t>(m_width) * m_height * m_channels;
822
823 for (size_t i = 0; i < m_data.size(); ++i) {
824 Memory::SeqlockWriteGuard g(m_slot_locks[i]);
825 m_data[i] = make_empty_storage(m_format, element_count);
826 m_cpu_stale[i].store(false, std::memory_order_release);
827 m_normalised_dirty[i].store(true, std::memory_order_release);
828 }
829
831}
std::vector< std::atomic< bool > > m_normalised_dirty
std::vector< std::atomic< bool > > m_cpu_stale
Per layer: the GPU image in m_layer_image_cache holds the content, m_data does not.
void update_processing_state(ProcessingState state) override
Update the processing state of the container.
@ IDLE
Container is inactive with no data or not ready for processing.
DataVariant make_empty_storage(ImageFormat format, size_t element_count)
Allocate a zeroed DataVariant of the alternative backing a format.

References MayaFlux::Kakshya::IDLE, m_channels, m_cpu_stale, m_data, m_format, m_height, m_normalised_dirty, m_slot_locks, m_width, MayaFlux::Kakshya::make_empty_storage(), and update_processing_state().

+ Here is the call graph for this function: