48 const GArray *raw_inputs);
54 gboolean *finish_commit_pending,
55 guint *stroke_sample_count,
56 uint32_t *current_stroke_batch,
Stroke-level path sampling and runtime-state API for drawlayer.
Mutable stroke runtime state owned by worker/backend code.
Definition iop/drawlayer/paint.h:100
guint fullres_queue_count
Definition worker.h:43
dt_drawlayer_worker_state_t backend_state
Definition worker.h:40
guint backend_queue_count
Definition worker.h:41
gboolean commit_pending
Definition worker.h:44
dt_drawlayer_worker_state_t fullres_state
Definition worker.h:42
Drawlayer worker global state shared with drawlayer module.
Definition worker.c:76
gboolean dt_drawlayer_worker_finished_stroke_queued(const dt_drawlayer_worker_t *worker)
Query whether the current preserved stroke has already been handed off for full-resolution replay.
Definition worker.c:1988
void dt_drawlayer_worker_get_snapshot(const dt_drawlayer_worker_t *worker, dt_drawlayer_worker_snapshot_t *snapshot)
Return a thread-safe worker snapshot for runtime scheduling.
Definition worker.c:1871
gboolean dt_drawlayer_worker_ensure_running(dt_iop_module_t *self, dt_drawlayer_worker_t *worker)
Ensure realtime/backend worker threads are started.
Definition worker.c:1861
dt_drawlayer_paint_stroke_t * dt_drawlayer_worker_stroke(dt_drawlayer_worker_t *worker)
Read-only access to preserved stroke runtime (valid only while worker is idle).
Definition worker.c:1970
dt_drawlayer_worker_state_t
Definition worker.h:31
@ DT_DRAWLAYER_WORKER_STATE_STOPPED
Definition worker.h:32
@ DT_DRAWLAYER_WORKER_STATE_IDLE
Definition worker.h:33
@ DT_DRAWLAYER_WORKER_STATE_BUSY
Definition worker.h:34
@ DT_DRAWLAYER_WORKER_STATE_PAUSED
Definition worker.h:36
@ DT_DRAWLAYER_WORKER_STATE_PAUSING
Definition worker.h:35
void dt_drawlayer_worker_cleanup(dt_drawlayer_worker_t **worker)
Stop worker and release all resources.
Definition worker.c:1844
void dt_drawlayer_worker_reset_backend_path(dt_drawlayer_worker_t *worker)
Reset worker-owned backend damage accumulator.
Definition worker.c:1937
gboolean dt_drawlayer_worker_enqueue_stroke_end(dt_drawlayer_worker_t *worker, const dt_drawlayer_paint_raw_input_t *input)
Enqueue stroke-end marker carrying final raw input sample.
Definition worker.c:2001
void dt_drawlayer_worker_flush_pending(dt_drawlayer_worker_t *worker)
Flush pending events and force commit transition.
Definition worker.c:1900
gboolean dt_drawlayer_worker_active(const dt_drawlayer_worker_t *worker)
Query whether realtime/backend worker still has pending activity.
Definition worker.c:1850
void dt_drawlayer_worker_init(dt_iop_module_t *self, dt_drawlayer_worker_t **worker, gboolean *painting, gboolean *finish_commit_pending, guint *stroke_sample_count, uint32_t *current_stroke_batch, dt_drawlayer_worker_finished_stroke_cb finished_stroke_cb)
Initialize worker and bind external state mirrors.
Definition worker.c:1834
void dt_drawlayer_worker_publish_backend_stroke_damage(dt_iop_module_t *self)
Publish accumulated backend stroke damage into drawlayer process/runtime state.
Definition worker.c:376
void dt_drawlayer_worker_request_commit(dt_drawlayer_worker_t *worker)
Request asynchronous commit once queues become idle.
Definition worker.c:1889
gboolean dt_drawlayer_worker_any_active(const dt_drawlayer_worker_t *worker)
Query whether any worker still has pending activity, including full-resolution replay.
Definition worker.c:1856
gboolean dt_drawlayer_worker_enqueue_input(dt_drawlayer_worker_t *worker, const dt_drawlayer_paint_raw_input_t *input)
Enqueue one raw input event (FIFO, no coalescing).
Definition worker.c:1994
void dt_drawlayer_worker_reset_live_publish(dt_drawlayer_worker_t *worker)
Reset worker-owned transient live-publish state.
Definition worker.c:1945
guint dt_drawlayer_worker_pending_dab_count(const dt_drawlayer_worker_t *worker)
Return the number of interpolated-but-not-yet-rasterized dabs in the current stroke batch.
Definition worker.c:1975
GArray * dt_drawlayer_worker_raw_inputs(dt_drawlayer_worker_t *worker)
Read-only access to preserved raw input queue for current stroke (valid only while worker is idle).
Definition worker.c:1964
void dt_drawlayer_worker_seal_for_commit(dt_drawlayer_worker_t *worker)
Seal current stroke for synchronous commit by folding queued raw inputs into preserved history.
Definition worker.c:1906
void dt_drawlayer_worker_reset_stroke(dt_drawlayer_worker_t *worker)
Clear preserved stroke runtime/history after a completed commit.
Definition worker.c:1954
gboolean(* dt_drawlayer_worker_finished_stroke_cb)(dt_iop_module_t *self, const GArray *raw_inputs)
Callback processing one finished stroke on the deferred full-resolution worker.
Definition worker.h:47
void dt_drawlayer_worker_stop(dt_iop_module_t *self, dt_drawlayer_worker_t *worker)
Stop realtime and full-resolution worker threads.
Definition worker.c:1866
gboolean dt_drawlayer_worker_replay_finished_stroke_to_base_patch(dt_iop_module_t *self, const GArray *raw_inputs)
Replay one finished stroke into the authoritative base patch from preserved raw inputs.
Definition worker.c:468
void dt_drawlayer_worker_flush_finished_strokes(dt_drawlayer_worker_t *worker)
Wait until deferred full-resolution replay queue is idle.
Definition worker.c:1932