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 92 of file GraphicsSubsystem.cpp.

93{
94 if (!m_handle) {
95 error<std::runtime_error>(
98 std::source_location::current(),
99 "Cannot register frame processor: no processing handle");
100 }
101
102 auto scheduler = m_handle->tasks;
103 if (!scheduler.is_valid()) {
104 error<std::runtime_error>(
107 std::source_location::current(),
108 "Cannot register frame processor: no scheduler available");
109 }
110
111 scheduler.register_token_processor(
112 [this](const std::vector<std::shared_ptr<Vruta::Routine>>& tasks, uint64_t processing_units) {
113 this->process_frame_coroutines_impl(tasks, processing_units);
114 });
115
117 "Registered custom FRAME_ACCURATE processor");
118}
#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: