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

◆ initialize_state()

bool MayaFlux::Vruta::GraphicsRoutine::initialize_state ( uint64_t  current_context = 0U)
overridevirtual

Initializes the coroutine's state for execution.

Parameters
current_sampleCurrent sample position in the timeline
Returns
True if initialization succeeded, false otherwise

Prepares the coroutine for execution by setting its initial sample position and other state. This should be called before the first attempt to resume the coroutine.

Implements MayaFlux::Vruta::Routine.

Definition at line 274 of file Routine.cpp.

275{
276 if (!is_active() || !m_handle.address()) {
277 return false;
278 }
279
280 m_handle.promise().next_frame = current_frame;
281 m_handle.resume();
282 return true;
283}
bool is_active() const override
Checks if the coroutine is still active.
Definition Routine.cpp:269
std::coroutine_handle< promise_type > m_handle
Handle to the underlying coroutine.
Definition Routine.hpp:654

References is_active(), and m_handle.

Referenced by try_resume_with_context().

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