还是一堆bug的状态
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#include "Latency_Eager_Plot_p.h"
|
||||
|
||||
namespace renderive {
|
||||
|
||||
Latency_Eager_Plot_Private::Latency_Eager_Plot_Private()
|
||||
: Abs_Plot_Private(std::make_unique<Latency_Eager_Refresh_Strategy>()) {
|
||||
latency_strategy = static_cast<Latency_Eager_Refresh_Strategy*>(strategy);
|
||||
}
|
||||
|
||||
Latency_Eager_Plot::Latency_Eager_Plot()
|
||||
: Abs_Plot(new Latency_Eager_Plot_Private()) {}
|
||||
|
||||
double Latency_Eager_Plot::get_max_render_fps() const {
|
||||
auto* data = static_cast<Latency_Eager_Plot_Private*>(d);
|
||||
return data->latency_strategy ? data->latency_strategy->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_strategy) {
|
||||
data->latency_strategy->set_max_render_fps(fps);
|
||||
data->core->mark_render_state_dirty();
|
||||
}
|
||||
}
|
||||
|
||||
Refresh_Control_Snapshot Latency_Eager_Plot::get_frame_feedback_state() const {
|
||||
auto* data = static_cast<Latency_Eager_Plot_Private*>(d);
|
||||
return data->latency_strategy ? data->latency_strategy->feedback_state() : Refresh_Control_Snapshot{};
|
||||
}
|
||||
|
||||
void Latency_Eager_Plot::start_render(int max_render_fps) {
|
||||
set_max_render_fps(max_render_fps);
|
||||
Abs_Plot::start_render();
|
||||
}
|
||||
|
||||
} // namespace renderive
|
||||
Reference in New Issue
Block a user