Replace the layer's pixel buffer with a byte source.
Valid only when the declared format is uint8-backed. Size must equal width * height * bytes_per_pixel.
564{
565 if (layer >=
m_data.size()) {
567 "TextureContainer::set_pixels(u8) layer {} out of range", layer);
568 return;
569 }
570 auto* buf = std::get_if<std::vector<uint8_t>>(&
m_data[layer]);
571 if (!buf) {
573 "TextureContainer::set_pixels(u8) called on non-uint8 format {}",
575 return;
576 }
577 if (data.size() != buf->size()) {
579 "TextureContainer::set_pixels(u8) size mismatch: got {} expected {}",
580 data.size(), buf->size());
581 return;
582 }
583
585 std::ranges::copy(data, buf->begin());
587}
#define MF_ERROR(comp, ctx,...)
std::vector< std::atomic< bool > > m_normalised_dirty
Memory::SeqlockArray m_slot_locks
Portal::Graphics::ImageFormat m_format
std::vector< DataVariant > m_data
@ ContainerProcessing
Container operations (Kakshya - file/stream/region processing)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.