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

◆ hold_layer()

void MayaFlux::Kakshya::TextureContainer::hold_layer ( uint32_t  layer)
protected

Mark layer as held on the GPU after its image was rewritten.

Drops the layer's CPU pixels, which a CPU accessor downloads again on its next read. Not safe while another thread reads or writes the container.

Definition at line 140 of file TextureContainer.cpp.

141{
142 if (layer >= m_data.size())
143 return;
144
145 {
146 Memory::SeqlockWriteGuard g(m_slot_locks[layer]);
148 m_cpu_stale[layer].store(true, std::memory_order_release);
149 m_normalised_dirty[layer].store(true, std::memory_order_release);
150 }
151
153}
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.
@ READY
Container has data loaded and is ready for processing.
DataVariant make_empty_storage(ImageFormat format, size_t element_count)
Allocate a zeroed DataVariant of the alternative backing a format.

References m_cpu_stale, m_data, m_format, m_normalised_dirty, m_slot_locks, MayaFlux::Kakshya::make_empty_storage(), MayaFlux::Kakshya::READY, and update_processing_state().

Referenced by MayaFlux::Kakshya::TextureCollection::append().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: