Split Linux platform target and move runtime/platform state
This commit is contained in:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user