Files
Renderive/Core/flow/Frame_Flow_Host.h
T
2026-08-03 08:15:37 +08:00

30 lines
844 B
C++

#pragma once
#include "../architecture/Frame_Scheduler.h"
#include <cstdint>
#include <memory>
namespace renderive {
struct Frame_Flow_Runtime_Snapshot {
bool destroying{};
bool dirty{};
bool render_job_active{};
bool middle_has_new_frame{};
bool paint_active{};
std::uint64_t now_ns{};
};
class Frame_Flow_Host {
public:
virtual ~Frame_Flow_Host() = default;
[[nodiscard]] virtual Frame_Flow_Runtime_Snapshot runtime_snapshot(std::uint64_t now_ns) const = 0;
[[nodiscard]] virtual bool try_render_once() = 0;
virtual void request_paint_from_middle() = 0;
virtual void schedule_render_deadline(std::uint64_t deadline_ns) = 0;
virtual void cancel_render_deadline() = 0;
virtual void record_feedback_event(std::shared_ptr<const Frame_Feedback_Event_Record>) {}
};
} // namespace renderive