Loading...
Searching...
No Matches
score::gfx::CaptureAdjustSlot Class Reference

Cross-thread handoff for CaptureAdjust. More...

Detailed Description

Cross-thread handoff for CaptureAdjust.

Not lock-free, and deliberately: a mutex taken only when the generation changed costs the render thread one relaxed load per frame in the common case, and reading the fields individually as atomics would let the renderer see half of one setting and half of the next – a visible colour flash while dragging two sliders.

Public Member Functions

void set (const CaptureAdjust &v)
 Writer side. Any thread.
 
bool poll (CaptureAdjust &out, std::uint32_t &lastSeen) const
 
CaptureAdjust value () const
 
std::uint32_t generation () const noexcept
 

Member Function Documentation

◆ poll()

bool score::gfx::CaptureAdjustSlot::poll ( CaptureAdjust out,
std::uint32_t &  lastSeen 
) const
inline

Reader side. Returns true when out was updated, i.e. only when something changed since the last call with this lastSeen.


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