Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorAnimation::IMotionClock Class Referenceabstract

Abstract clock interface for the motion runtime. More...

#include <phosphor-animation/include/PhosphorAnimation/IMotionClock.h>

Inheritance diagram for PhosphorAnimation::IMotionClock:
[legend]

Public Member Functions

virtual ~IMotionClock ()=default
 
 IMotionClock (const IMotionClock &)=delete
 
IMotionClockoperator= (const IMotionClock &)=delete
 
 IMotionClock (IMotionClock &&)=delete
 
IMotionClockoperator= (IMotionClock &&)=delete
 
virtual std::chrono::nanoseconds now () const =0
 Monotonically non-decreasing steady-clock reading (nanoseconds).
 
virtual qreal refreshRate () const =0
 Nominal refresh rate in Hz, or zero if unknown.
 
virtual void requestFrame ()=0
 Schedule another paint tick. Idempotent within a single frame.
 
virtual const void * epochIdentity () const
 Opaque epoch identity for rebindClock compatibility.
 

Static Public Member Functions

static const void * steadyClockEpoch ()
 Shared sentinel for std::chrono::steady_clock-backed clocks.
 
static bool epochCompatible (const IMotionClock *a, const IMotionClock *b)
 True iff both clocks are non-null and share the same non-null epochIdentity.
 

Protected Member Functions

 IMotionClock ()=default
 

Detailed Description

Abstract clock interface for the motion runtime.

Pull-model: consumers read now() during their paint cycle. One clock per output/window to support mixed refresh rates.

Constructor & Destructor Documentation

◆ ~IMotionClock()

virtual PhosphorAnimation::IMotionClock::~IMotionClock ( )
virtualdefault

◆ IMotionClock() [1/3]

PhosphorAnimation::IMotionClock::IMotionClock ( const IMotionClock )
delete

◆ IMotionClock() [2/3]

PhosphorAnimation::IMotionClock::IMotionClock ( IMotionClock &&  )
delete

◆ IMotionClock() [3/3]

PhosphorAnimation::IMotionClock::IMotionClock ( )
protecteddefault

Member Function Documentation

◆ epochCompatible()

static bool PhosphorAnimation::IMotionClock::epochCompatible ( const IMotionClock a,
const IMotionClock b 
)
inlinestatic

True iff both clocks are non-null and share the same non-null epochIdentity.

◆ epochIdentity()

virtual const void * PhosphorAnimation::IMotionClock::epochIdentity ( ) const
inlinevirtual

Opaque epoch identity for rebindClock compatibility.

nullptr (default) = incompatible with rebind onto any other clock. Clocks sharing the same non-null identity are rebase-safe.

Reimplemented in PhosphorAnimation::QtQuickClock.

◆ now()

virtual std::chrono::nanoseconds PhosphorAnimation::IMotionClock::now ( ) const
pure virtual

Monotonically non-decreasing steady-clock reading (nanoseconds).

Implemented in PhosphorAnimation::QtQuickClock.

◆ operator=() [1/2]

IMotionClock & PhosphorAnimation::IMotionClock::operator= ( const IMotionClock )
delete

◆ operator=() [2/2]

IMotionClock & PhosphorAnimation::IMotionClock::operator= ( IMotionClock &&  )
delete

◆ refreshRate()

virtual qreal PhosphorAnimation::IMotionClock::refreshRate ( ) const
pure virtual

Nominal refresh rate in Hz, or zero if unknown.

Implemented in PhosphorAnimation::QtQuickClock.

◆ requestFrame()

virtual void PhosphorAnimation::IMotionClock::requestFrame ( )
pure virtual

Schedule another paint tick. Idempotent within a single frame.

Implemented in PhosphorAnimation::QtQuickClock.

◆ steadyClockEpoch()

static const void * PhosphorAnimation::IMotionClock::steadyClockEpoch ( )
static

Shared sentinel for std::chrono::steady_clock-backed clocks.


The documentation for this class was generated from the following file: