Split Linux platform target and move runtime/platform state

This commit is contained in:
2026-06-17 01:20:11 +02:00
parent 90a55b86fe
commit 3ce365fc15
16 changed files with 169 additions and 94 deletions

View File

@@ -46,6 +46,8 @@ public:
void notify_ui_worker() noexcept;
void prepared_file_task(std::function<void()> task);
void canvas_async_task(std::function<void()> task);
void main_thread_task(std::packaged_task<void()> task);
void drain_main_thread_tasks();
void render_thread_tick(App& app);
void render_thread_main(App& app, std::stop_token stop_token);
@@ -221,6 +223,9 @@ private:
std::jthread canvas_async_worker_;
bool canvas_async_running_ = true;
std::deque<std::packaged_task<void()>> main_thread_tasklist_;
std::mutex main_thread_task_mutex_;
std::deque<AppTask> render_tasklist_;
std::mutex render_task_mutex_;
std::condition_variable render_cv_;