|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
TextureProcessor subclass accepting externally-supplied pixel data via DataVariant each frame. More...
#include <TextureWriteProcessor.hpp>
Inheritance diagram for MayaFlux::Buffers::TextureWriteProcessor:
Collaboration diagram for MayaFlux::Buffers::TextureWriteProcessor:Public Member Functions | |
| bool | has_pending () const noexcept |
| Returns true if a snapshot has been set and not yet consumed. | |
| void | set_data (Kakshya::DataVariant variant) |
| Supply pixel data for the next cycle. | |
| TextureWriteProcessor () | |
| ~TextureWriteProcessor () override=default | |
Public Member Functions inherited from MayaFlux::Buffers::TextureProcessor | |
| void | invalidate_staging () |
| Invalidate the persistent streaming staging buffer. | |
| bool | is_streaming_mode () const |
| Check if streaming mode is enabled. | |
| void | set_streaming_mode (bool enabled) |
| Enable or disable streaming mode for pixel uploads. | |
| TextureProcessor () | |
| ~TextureProcessor () override | |
Public Member Functions inherited from MayaFlux::Buffers::BufferProcessor | |
| virtual ProcessingToken | get_processing_token () const |
| Gets the current processing token for this buffer. | |
| virtual bool | is_compatible_with (const std::shared_ptr< Buffer > &) const |
| Checks if this processor can handle the specified buffer type. | |
| void | process (const std::shared_ptr< Buffer > &buffer) |
| Applies a computational transformation to the data in the provided buffer. | |
| virtual void | set_processing_token (ProcessingToken token) |
| Gets the preferred processing backend for this processor. | |
| virtual | ~BufferProcessor ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Protected Member Functions | |
| std::optional< Kakshya::DataVariant > | get_variant_source () override |
Protected Member Functions inherited from MayaFlux::Buffers::TextureProcessor | |
| void | on_attach (const std::shared_ptr< Buffer > &buffer) override |
| Called when this processor is attached to a buffer. | |
| void | on_detach (const std::shared_ptr< Buffer > &buffer) override |
| Called when this processor is detached from a buffer. | |
| void | processing_function (const std::shared_ptr< Buffer > &buffer) override |
| The core processing function that must be implemented by derived classes. | |
Protected Member Functions inherited from MayaFlux::Buffers::VKBufferProcessor | |
| void | ensure_initialized (const std::shared_ptr< VKBuffer > &buffer) |
| void | initialize_buffer_service () |
| void | initialize_compute_service () |
Private Attributes | |
| std::optional< Kakshya::DataVariant > | m_active |
| std::atomic_flag | m_dirty |
| std::optional< Kakshya::DataVariant > | m_pending |
Additional Inherited Members | |
Public Types inherited from MayaFlux::Buffers::TextureProcessor | |
| enum class | PixelSource : uint8_t { BUFFER_STORAGE , EXTERNAL_DATA } |
| Source of pixel data for GPU uploads. More... | |
Protected Attributes inherited from MayaFlux::Buffers::TextureProcessor | |
| PixelSource | m_pixel_source { PixelSource::BUFFER_STORAGE } |
| std::shared_ptr< TextureBuffer > | m_texture_buffer |
Protected Attributes inherited from MayaFlux::Buffers::VKBufferProcessor | |
| Registry::Service::BufferService * | m_buffer_service = nullptr |
| Registry::Service::ComputeService * | m_compute_service = nullptr |
Protected Attributes inherited from MayaFlux::Buffers::BufferProcessor | |
| ProcessingToken | m_processing_token { ProcessingToken::AUDIO_BACKEND } |
TextureProcessor subclass accepting externally-supplied pixel data via DataVariant each frame.
Sets PixelSource::EXTERNAL_DATA so update_pixels_if_dirty() routes through get_variant_source() rather than TextureBuffer::m_pixel_data. All other behaviour — geometry updates, GPU upload, staging buffer management, streaming mode — is inherited unchanged from TextureProcessor.
Caller supplies data via set_data(). The dirty flag on the TextureBuffer is set on each set_data() call and cleared by the parent after upload. If no new data has been set since the last cycle, the upload is skipped and the dirty flag is cleared — no stale re-upload.
Thread safety: set_data() and the graphics thread may run concurrently. Lock-free double-buffer swap via atomic_flag ensures the graphics thread never blocks on the supplier thread.
Definition at line 27 of file TextureWriteProcessor.hpp.