Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::FrameCostProbe Class Reference

#include <frame_cost_probe.hpp>

Classes

struct  Frame
struct  Summary
struct  Budget

Public Member Functions

 FrameCostProbe (View &root, PluginViewHost::Size surface={})
 Attach a recording host to root for the probe's lifetime.
 ~FrameCostProbe ()
 FrameCostProbe (const FrameCostProbe &)=delete
FrameCostProbe & operator= (const FrameCostProbe &)=delete
template<typename Fn>
const Frame & measure (Fn &&frame)
 Run one frame's work and record what it cost.
const std::vector< Frame > & frames () const
void clear ()
Summary summary () const

Static Public Member Functions

static std::vector< std::string > check (const Summary &s, const Budget &budget, const Summary *baseline=nullptr)
 One human-readable line per breach of budget; empty when within it.

Constructor & Destructor Documentation

◆ FrameCostProbe() [1/2]

pulp::view::FrameCostProbe::FrameCostProbe ( View & root,
PluginViewHost::Size surface = {} )
inlineexplicit

Attach a recording host to root for the probe's lifetime.

surface is the size the host reports (the editor's logical size).

◆ ~FrameCostProbe()

pulp::view::FrameCostProbe::~FrameCostProbe ( )
inline

◆ FrameCostProbe() [2/2]

pulp::view::FrameCostProbe::FrameCostProbe ( const FrameCostProbe & )
delete

Member Function Documentation

◆ check()

std::vector< std::string > pulp::view::FrameCostProbe::check ( const Summary & s,
const Budget & budget,
const Summary * baseline = nullptr )
inlinestatic

One human-readable line per breach of budget; empty when within it.

◆ clear()

void pulp::view::FrameCostProbe::clear ( )
inline

◆ frames()

const std::vector< Frame > & pulp::view::FrameCostProbe::frames ( ) const
inline

◆ measure()

template<typename Fn>
const Frame & pulp::view::FrameCostProbe::measure ( Fn && frame)
inline

Run one frame's work and record what it cost.

◆ operator=()

FrameCostProbe & pulp::view::FrameCostProbe::operator= ( const FrameCostProbe & )
delete

◆ summary()

Summary pulp::view::FrameCostProbe::summary ( ) const
inline

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