还是一堆bug的状态

This commit is contained in:
2026-08-01 20:09:45 +08:00
parent 0df7beda49
commit 8fb9683182
294 changed files with 13678 additions and 10864 deletions
+43
View File
@@ -0,0 +1,43 @@
#pragma once
#include "../architecture/Frame_Scheduler.h"
#include <cstdint>
namespace renderive {
enum class Refresh_Trigger : std::uint8_t {
Started,
Input_Dirty,
Render_Finished,
Paint_Finished,
Frame_Returned,
Timer_Fired,
Manual_Request,
Paused
};
struct Refresh_Runtime_Snapshot {
bool enabled{};
bool destroying{};
bool dirty{};
bool render_job_active{};
bool middle_has_new_frame{};
bool paint_active{};
std::uint64_t now_ns{};
};
struct Refresh_Action {
bool try_render{};
bool request_paint{};
std::uint64_t render_deadline_ns{};
};
class Refresh_Strategy {
public:
virtual ~Refresh_Strategy() = default;
[[nodiscard]] virtual Refresh_Action on_trigger(
Refresh_Trigger trigger,
const Refresh_Runtime_Snapshot& runtime,
const Frame_Lifecycle_Record* frame) = 0;
};
} // namespace renderive