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

◆ register_frame_processor()

void MayaFlux::Core::GraphicsSubsystem::register_frame_processor ( )
private

Register custom frame processor with scheduler.

This is the key integration point that makes graphics timing work. Registers a custom processor for FRAME_ACCURATE token that:

  • Does NOT tick the clock (already done)
  • Just processes coroutines based on current clock position

Definition at line 94 of file GraphicsSubsystem.cpp.

95{
96 if (!m_handle) {
97 error<std::runtime_error>(
100 std::source_location::current(),
101 "Cannot register frame processor: no processing handle");
102 }
103
104 auto scheduler = m_handle->tasks;
105 if (!scheduler.is_valid()) {
106 error<std::runtime_error>(
109 std::source_location::current(),
110 "Cannot register frame processor: no scheduler available");
111 }
112
113 scheduler.register_token_processor(
114 [this](const std::vector<std::shared_ptr<Vruta::Routine>>& tasks, uint64_t processing_units) {
115 this->process_frame_coroutines_impl(tasks, processing_units);
116 });
117
119 "Registered custom FRAME_ACCURATE processor");
120}
#define MF_INFO(comp, ctx,...)
void process_frame_coroutines_impl(const std::vector< std::shared_ptr< Vruta::Routine > > &tasks, uint64_t processing_units)
Process all FRAME_ACCURATE coroutines for given frames.
SubsystemProcessingHandle * m_handle
Reference to processing handle.
@ GraphicsSubsystem
Graphics subsystem operations (Vulkan, rendering pipeline)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::GraphicsSubsystem, m_handle, MF_INFO, process_frame_coroutines_impl(), and MayaFlux::Core::SubsystemProcessingHandle::tasks.

Referenced by register_callbacks().

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