Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dt_drawlayer_worker_t Struct Reference

Drawlayer worker global state shared with drawlayer module. More...

+ Collaboration diagram for dt_drawlayer_worker_t:

Data Fields

dt_iop_module_t * self
 
gboolean * painting
 
gboolean * finish_commit_pending
 
guint * stroke_sample_count
 
uint32_t * current_stroke_batch
 
dt_pthread_mutex_t worker_mutex
 
pthread_cond_t worker_cond
 
drawlayer_rt_worker_t workers [DRAWLAYER_RT_WORKER_COUNT]
 
GArray * backend_history
 
GArray * stroke_raw_inputs
 
dt_drawlayer_paint_stroke_t * stroke
 
dt_drawlayer_damaged_rect_t * backend_path
 
dt_drawlayer_cache_patch_t heartbeat_patch
 
dt_drawlayer_cache_patch_t heartbeat_stroke_mask
 
float * heartbeat_transmittance
 
float * heartbeat_noise
 
size_t heartbeat_transmittance_capacity
 
gint64 live_publish_ts
 
uint32_t live_publish_serial
 
dt_drawlayer_damaged_rect_t live_publish_damage
 
guint commit_idle_id
 
dt_iop_drawlayer_params_t publish_params
 

Detailed Description

Drawlayer worker global state shared with drawlayer module.

Definition at line 93 of file worker.c.

Field Documentation

◆ backend_history

GArray* dt_drawlayer_worker_t::backend_history

Emitted dab history owned by worker.

Definition at line 103 of file worker.c.

Referenced by _rt_destroy_state(), _rt_init_state(), _stroke_begin(), _stroke_clear(), and _stroke_create().

◆ backend_path

dt_drawlayer_damaged_rect_t* dt_drawlayer_worker_t::backend_path

Worker-owned backend damage accumulator.

Definition at line 106 of file worker.c.

Referenced by _rasterize_pending_dab_batch(), _reset_backend_path(), _rt_destroy_state(), and _rt_init_state().

◆ commit_idle_id

guint dt_drawlayer_worker_t::commit_idle_id

GUI-thread commit request in flight, 0 when none. Guarded by worker_mutex.

Definition at line 117 of file worker.c.

Referenced by _backend_worker_on_idle(), _cancel_pending_gui_commit(), and _commit_dabs_on_gui_thread().

◆ current_stroke_batch

uint32_t* dt_drawlayer_worker_t::current_stroke_batch

External stroke-batch counter mirror.

Definition at line 99 of file worker.c.

Referenced by _enqueue_stroke_end(), and _rt_init_state().

◆ finish_commit_pending

◆ heartbeat_noise

float* dt_drawlayer_worker_t::heartbeat_noise

Worker-private sprinkle field for the batch path, shared by every dab of a batch.

Definition at line 110 of file worker.c.

Referenced by _ensure_heartbeat_batch_buffers(), _rasterize_pending_dab_batch(), and _rt_destroy_state().

◆ heartbeat_patch

dt_drawlayer_cache_patch_t dt_drawlayer_worker_t::heartbeat_patch

Worker-private scratch patch for one heartbeat batch.

Definition at line 107 of file worker.c.

Referenced by _ensure_heartbeat_batch_buffers(), _rasterize_pending_dab_batch(), and _rt_destroy_state().

◆ heartbeat_stroke_mask

dt_drawlayer_cache_patch_t dt_drawlayer_worker_t::heartbeat_stroke_mask

Worker-private stroke mask for one heartbeat batch.

Definition at line 108 of file worker.c.

Referenced by _ensure_heartbeat_batch_buffers(), _rasterize_pending_dab_batch(), and _rt_destroy_state().

◆ heartbeat_transmittance

float* dt_drawlayer_worker_t::heartbeat_transmittance

Worker-private coverage plane for the batch path, one float per patch pixel.

Definition at line 109 of file worker.c.

Referenced by _ensure_heartbeat_batch_buffers(), _rasterize_pending_dab_batch(), and _rt_destroy_state().

◆ heartbeat_transmittance_capacity

size_t dt_drawlayer_worker_t::heartbeat_transmittance_capacity

Allocated floats. Grow-only: the batch box changes by a pixel or two per frame as the pointer moves, and reallocating on any DIFFERENCE rather than on a shortfall would hit the allocator ~50 times a second during a drag.

Definition at line 111 of file worker.c.

Referenced by _ensure_heartbeat_batch_buffers(), and _rt_destroy_state().

◆ live_publish_damage

dt_drawlayer_damaged_rect_t dt_drawlayer_worker_t::live_publish_damage

Worker-owned accumulated publish damage.

Definition at line 116 of file worker.c.

Referenced by _publish_backend_progress(), _rasterize_pending_dab_batch(), and _reset_live_publish().

◆ live_publish_serial

uint32_t dt_drawlayer_worker_t::live_publish_serial

Monotonic live publish serial committed by heartbeat flushes.

Definition at line 115 of file worker.c.

Referenced by _publish_backend_progress(), and _reset_live_publish().

◆ live_publish_ts

gint64 dt_drawlayer_worker_t::live_publish_ts

Realtime publish pacing timestamp.

Definition at line 114 of file worker.c.

Referenced by _live_publish_deadline_reached(), _process_backend_input(), _publish_backend_progress(), and _reset_live_publish().

◆ painting

gboolean* dt_drawlayer_worker_t::painting

External painting-state mirror.

Definition at line 96 of file worker.c.

Referenced by _backend_worker_on_idle(), _rt_init_state(), and _workers_ready_for_commit_locked().

◆ publish_params

dt_iop_drawlayer_params_t dt_drawlayer_worker_t::publish_params

Worker-private params blob used by the realtime heartbeat. Seeded from self->params by the GUI thread at stroke begin (dt_drawlayer_worker_snapshot_params), then owned by the worker. The heartbeat must never touch self->params: that blob belongs to the GUI thread, and bumping its hash in place was an unsynchronised read-modify-write of 344 bytes that includes two strings.

Definition at line 118 of file worker.c.

Referenced by _publish_backend_progress(), and dt_drawlayer_worker_snapshot_params().

◆ self

dt_iop_module_t* dt_drawlayer_worker_t::self

◆ stroke

◆ stroke_raw_inputs

GArray* dt_drawlayer_worker_t::stroke_raw_inputs

Preserved raw input history for current stroke.

Definition at line 104 of file worker.c.

Referenced by _backend_worker_process_sample(), _rt_destroy_state(), _rt_init_state(), _stroke_begin(), _stroke_clear(), and dt_drawlayer_worker_raw_inputs().

◆ stroke_sample_count

guint* dt_drawlayer_worker_t::stroke_sample_count

External per-stroke sample counter mirror.

Definition at line 98 of file worker.c.

Referenced by _enqueue_input(), and _rt_init_state().

◆ worker_cond

◆ worker_mutex

◆ workers

drawlayer_rt_worker_t dt_drawlayer_worker_t::workers[DRAWLAYER_RT_WORKER_COUNT]

Worker slots.

Definition at line 102 of file worker.c.

Referenced by _backend_worker(), and _backend_worker_const().


The documentation for this struct was generated from the following file: