Wraps GfxContext's shared wall-timer (clock #2, the default). More...
Detailed Description
Wraps GfxContext's shared wall-timer (clock #2, the default).
One TimerClock == one HighResolutionTimer acquired from a score::Timers pool at a given frequency, shared (coalesced) among every output rendering at that rate — mirroring the old GfxContext::m_manualTimers entry. The per-output fan-out (render() for each output that canRender()) lives in the tick closure that GfxContext hands to start(), exactly as the old on_manual_timer did.
Public Member Functions | |
| TimerClock (score::Timers &timers, QObject *owner, double frequencyHz) | |
| Kind | kind () const noexcept override |
| double | frequency () const noexcept |
| void | addOutput (OutputNode *o) |
| void | removeOutput (OutputNode *o) |
| bool | empty () const noexcept |
| const std::vector< OutputNode * > & | outputs () const noexcept |
| void | start (std::function< void()> tick) override |
| Begin delivering ticks. | |
| void | stop () override |
| Stop delivering ticks and release the underlying tick source. | |
Additional Inherited Members | |
Public Types inherited from score::gfx::RenderClock | |
| enum class | Kind { Timer , DisplayVSync , ExternalGenlock } |
Constructor & Destructor Documentation
◆ TimerClock()
| score::gfx::TimerClock::TimerClock | ( | score::Timers & | timers, |
| QObject * | owner, | ||
| double | frequencyHz | ||
| ) |
- Parameters
-
timers the (per-GfxContext) timer pool to acquire from owner QObject used as the queued-connection receiver context, so the tick runs on that object's thread (score's render thread) — identical to the old connect(timer, ..., this). frequencyHz the shared timer frequency (1000 / manualRenderingRate)
Member Function Documentation
◆ kind()
|
inlineoverridevirtualnoexcept |
Implements score::gfx::RenderClock.
◆ start()
|
overridevirtual |
Begin delivering ticks.
tick is invoked once per render tick, on the render thread. The clock owns the tick source (timer, vsync registration, or hardware wait loop).
Implements score::gfx::RenderClock.
◆ stop()
|
overridevirtual |
Stop delivering ticks and release the underlying tick source.
Implements score::gfx::RenderClock.
The documentation for this class was generated from the following files:
- RenderClock.hpp
- RenderClock.cpp
Public Types inherited from