38 lines
1.5 KiB
C++
38 lines
1.5 KiB
C++
#include "Latency_Eager_Plot_p.h"
|
|
namespace renderive {
|
|
Latency_Eager_Plot_Private::Latency_Eager_Plot_Private()
|
|
: Abs_Plot_Private(std::make_unique<Low_Latency_Frame_Flow>()) {
|
|
latency_flow = static_cast<Low_Latency_Frame_Flow*>(flow);
|
|
}
|
|
Latency_Eager_Plot::Latency_Eager_Plot()
|
|
: Abs_Plot(new Latency_Eager_Plot_Private()) {}
|
|
void Latency_Eager_Plot::start() {
|
|
d->core->activate_view();
|
|
}
|
|
void Latency_Eager_Plot::pause() {
|
|
d->core->deactivate_view();
|
|
}
|
|
bool Latency_Eager_Plot::running() const {
|
|
return d->core->view_active();
|
|
}
|
|
double Latency_Eager_Plot::max_render_fps() const {
|
|
auto* data = static_cast<Latency_Eager_Plot_Private*>(d);
|
|
return data->latency_flow ? data->latency_flow->max_render_fps() : 0.0;
|
|
}
|
|
void Latency_Eager_Plot::set_max_render_fps(double fps) {
|
|
auto* data = static_cast<Latency_Eager_Plot_Private*>(d);
|
|
if (data->latency_flow) {
|
|
data->latency_flow->set_max_render_fps(fps);
|
|
data->core->notify_model_dirty();
|
|
}
|
|
}
|
|
Low_Latency_Diagnostics Latency_Eager_Plot::diagnostics() const {
|
|
auto* data = static_cast<Latency_Eager_Plot_Private*>(d);
|
|
return data->latency_flow ? data->latency_flow->low_latency_diagnostics() : Low_Latency_Diagnostics{};
|
|
}
|
|
Refresh_Control_Snapshot Latency_Eager_Plot::refresh_feedback_snapshot() const {
|
|
auto* data = static_cast<Latency_Eager_Plot_Private*>(d);
|
|
return data->latency_flow ? data->latency_flow->feedback_state() : Refresh_Control_Snapshot{};
|
|
}
|
|
} // namespace renderive
|