Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::motion::CostSample Struct Reference

Per-frame cost attribution sample. More...

#include <motion_cost.hpp>

Public Attributes

std::uint64_t frame = 0
double t_seconds = 0.0
double render_pass_duration_ms = 0.0
 Wall time spent in the most recently completed render pass.
double dirty_rect_area_px = 0.0
 Total area (in pixels^2) of all dirty rectangles snapshotted from DirtyTracker::dirty_rects().
int dirty_rect_count = 0
 Number of dirty rectangles snapshotted this frame.
std::vector< int > active_trace_ids
 Trace ids that emitted at least one SampleEvent on this frame.
std::vector< Provenance > active_provenance
 Provenance envelopes for each entry in active_trace_ids, in the same order.

Detailed Description

Per-frame cost attribution sample.

Emitted by CostAttributor on each FrameClock tick while cost attribution is enabled. A frame with no active traces still emits a sample so the timeline of render cost is contiguous.

Member Data Documentation

◆ active_provenance

std::vector<Provenance> pulp::view::motion::CostSample::active_provenance

Provenance envelopes for each entry in active_trace_ids, in the same order.

Entries without provenance carry a default-constructed Provenance.

◆ active_trace_ids

std::vector<int> pulp::view::motion::CostSample::active_trace_ids

Trace ids that emitted at least one SampleEvent on this frame.

Sorted ascending. Empty when no motion is active.

◆ dirty_rect_area_px

double pulp::view::motion::CostSample::dirty_rect_area_px = 0.0

Total area (in pixels^2) of all dirty rectangles snapshotted from DirtyTracker::dirty_rects().

0 when no probe is wired.

◆ dirty_rect_count

int pulp::view::motion::CostSample::dirty_rect_count = 0

Number of dirty rectangles snapshotted this frame.

0 when no probe is wired or no rectangles are pending.

◆ frame

std::uint64_t pulp::view::motion::CostSample::frame = 0

◆ render_pass_duration_ms

double pulp::view::motion::CostSample::render_pass_duration_ms = 0.0

Wall time spent in the most recently completed render pass.

Snapshotted from RenderPassManager::total_time_ms() when a probe is wired; 0 otherwise. Defensive: callers should not assume Pulp tracks this on every platform.

◆ t_seconds

double pulp::view::motion::CostSample::t_seconds = 0.0

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