核心模板架构

This commit is contained in:
2026-08-04 16:24:41 +08:00
parent 68476882a3
commit f1b9cadd47
121 changed files with 4782 additions and 210 deletions
@@ -92,7 +92,7 @@ struct Explicit_Input_Frame_Handle final : Render_Input_Frame_Handle {
runtime->committed_update_states.push_back(std::move(runtime->input.completion_state));
}
if (input)
input->clear();
input->consume();
runtime->input.pending = false;
}
Explicit_Renderable_Runtime_Data* runtime{};
@@ -192,6 +192,13 @@ Render_Input_Write_Guard Explicit_Renderable_Runtime::acquire_edit_input(bool no
return Render_Input_Write_Guard(d->input.data, std::make_unique<Explicit_Input_Write_Handle>(d.get(), std::move(lock), notify_render));
}
Render_Input_Frame_Guard Explicit_Renderable_Runtime::acquire_input_read(Renderable_Input_Role) {
std::unique_lock<std::mutex> lock(d->input_mutex, std::try_to_lock);
if (!lock || !d->input.data)
return {};
return Render_Input_Frame_Guard(d->input.data, std::make_unique<Explicit_Input_Frame_Handle>(d.get(), std::move(lock)));
}
Renderable_Frame_View Explicit_Renderable_Runtime::capture_frame_view() {
std::unique_lock<std::mutex> state_lock(d->state_mutex);
if (!d->state)
@@ -21,6 +21,7 @@ public:
Render_State_Read_Guard acquire_edit_state_read() override;
Render_State_Write_Guard acquire_edit_state() override;
Render_Input_Write_Guard acquire_edit_input(bool notify_render) override;
Render_Input_Frame_Guard acquire_input_read(Renderable_Input_Role role) override;
Renderable_Frame_View capture_frame_view() override;
Render_State* state(Renderable_State_Role role) override;
Input_Data* input_data(Renderable_Input_Role role) override;