核心模板架构
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user