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

◆ as_uint8()

std::span< const uint8_t > MayaFlux::Kakshya::TextureContainer::as_uint8 ( uint32_t  layer = 0) const

Typed view over the uint8 variant.

Returns an empty span if the layer's variant is not uint8.

Definition at line 527 of file TextureContainer.cpp.

528{
529 if (layer >= m_data.size())
530 return {};
531 ensure_cpu(layer);
532 const auto* v = std::get_if<std::vector<uint8_t>>(&m_data[layer]);
533 return v ? std::span<const uint8_t>(v->data(), v->size()) : std::span<const uint8_t> {};
534}
void ensure_cpu(uint32_t layer) const
Download a GPU-held layer into m_data before a CPU read.

References ensure_cpu(), and m_data.

+ Here is the call graph for this function: