Harden app runtime and thin export shell

This commit is contained in:
2026-06-17 18:15:54 +02:00
parent bc9ba75e49
commit 04a1c5d0b1
13 changed files with 426 additions and 206 deletions

View File

@@ -336,19 +336,19 @@ public:
bool is_render_thread()
{
return runtime_.is_render_thread();
return runtime().is_render_thread();
}
template<typename T>
std::future<void> render_task_async(T task, bool unique = false)
{
return runtime_.render_task_async(std::move(task), unique);
return runtime().render_task_async(std::move(task), unique);
}
template<typename T>
void render_task(T task)
{
runtime_.render_task(std::move(task));
runtime().render_task(std::move(task));
}
void render_sync()
@@ -367,27 +367,27 @@ public:
bool is_ui_thread()
{
return runtime_.is_ui_thread();
return runtime().is_ui_thread();
}
template<typename T>
std::future<void> ui_task_async(T task, bool unique = false)
{
return runtime_.ui_task_async(std::move(task), unique);
return runtime().ui_task_async(std::move(task), unique);
}
template<typename T>
void ui_task(T task)
{
runtime_.ui_task(std::move(task));
if (runtime_.request_redraw())
runtime().ui_task(std::move(task));
if (runtime().request_redraw())
redraw = true;
runtime_.clear_request_redraw();
runtime().clear_request_redraw();
}
void ui_sync()
{
runtime_.ui_sync();
runtime().ui_sync();
}
private: