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

◆ has_data()

bool MayaFlux::Kakshya::TextureContainer::has_data ( ) const
overridevirtual

Check if the container currently holds any data.

Returns
true if data is present, false otherwise

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

Definition at line 959 of file TextureContainer.cpp.

960{
961 if (m_data.empty()) {
962 return false;
963 }
964
965 if (m_cpu_stale[0].load(std::memory_order_acquire))
966 return true;
967
968 auto [ptr, bytes] = variant_bytes(m_data[0]);
969 return ptr && bytes > 0;
970}
const uint8_t * ptr
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.
std::pair< const uint8_t *, size_t > variant_bytes(const DataVariant &v)
Get a pointer to the raw bytes of a DataVariant and its size.
Definition DataUtils.cpp:95

References m_cpu_stale, m_data, ptr, and MayaFlux::Kakshya::variant_bytes().

+ Here is the call graph for this function: