Skip to main content

Repaint class

Namespace: Arlecchino · Assembly: Arlecchino

The "this frame is stale" signal the render loop waits on. Input, navigation, state changes and atom writes raise it for you; raise it yourself when something else changes what a view draws.

public sealed class Repaint : IDisposable

Implements IDisposable

Constructors

MemberSummary
Repaint()Starts listening for atom writes, so any of them marks the frame stale.

Properties

MemberSummary
IsRequestedWhether a frame is owed. Reading it does not consume the request.

Methods

MemberSummary
Dispose()Stops listening for atom writes.
Request()Asks for a frame. Safe to call from any thread and cheap to call repeatedly.
TakeRequested()Consumes the request; the render loop calls this once per tick.

Constructors in detail

Repaint()

public Repaint();

Starts listening for atom writes, so any of them marks the frame stale.

Properties in detail

IsRequested

public bool IsRequested { get; }

Whether a frame is owed. Reading it does not consume the request.

Type bool

Methods in detail

Dispose()

public void Dispose();

Stops listening for atom writes.

Request()

public void Request();

Asks for a frame. Safe to call from any thread and cheap to call repeatedly.

TakeRequested()

public bool TakeRequested();

Consumes the request; the render loop calls this once per tick.

Returns booltrue when a frame was owed.