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

The coherent set of numbers a darkroom pipe plans its ROI from. More...

#include <dev_roi_request.h>

+ Collaboration diagram for dt_dev_roi_request_t:

Data Fields

uint64_t generation
 
int32_t box_width
 
int32_t box_height
 
int32_t processed_width
 
int32_t processed_height
 
int32_t preview_width
 
int32_t preview_height
 
float natural_scale
 
float scaling
 
float center_x
 
float center_y
 
gboolean valid
 

Detailed Description

The coherent set of numbers a darkroom pipe plans its ROI from.

These were loose fields of dev->roi, written by the GUI thread in three separate functions and read one at a time by the worker inside _update_darkroom_roi(). Every consumer uses them as a product – natural_scale * scaling * processed_size – so a read that straddles a write yields a frame whose geometry never existed, and which is internally consistent and correctly hashed, so nothing downstream can tell.

They now cross the GUI/pipeline boundary only together, published as one record with a generation. The viewport and the geometry record are the inputs; this is what is derived from them and handed to the pipeline.

Definition at line 44 of file dev_roi_request.h.

Field Documentation

◆ box_height

int32_t dt_dev_roi_request_t::box_height

from the viewport

Definition at line 49 of file dev_roi_request.h.

Referenced by _payload_equal(), _update_darkroom_roi(), and dt_dev_roi_request_publish().

◆ box_width

int32_t dt_dev_roi_request_t::box_width

◆ center_x

float dt_dev_roi_request_t::center_x

◆ center_y

float dt_dev_roi_request_t::center_y

ROI centre, from the viewport

Definition at line 54 of file dev_roi_request.h.

Referenced by _payload_equal(), _update_darkroom_roi(), dt_dev_roi_request_neutral(), and dt_dev_roi_request_publish().

◆ generation

uint64_t dt_dev_roi_request_t::generation

Bumped only when the payload below actually changed.

Definition at line 47 of file dev_roi_request.h.

Referenced by _darkroom_zoom_hash(), and dt_dev_roi_request_publish().

◆ natural_scale

◆ preview_height

◆ preview_width

◆ processed_height

int32_t dt_dev_roi_request_t::processed_height

from the geometry record

Definition at line 50 of file dev_roi_request.h.

Referenced by _payload_equal(), _update_darkroom_roi(), dt_dev_get_thumbnail_size(), and dt_dev_roi_request_publish().

◆ processed_width

int32_t dt_dev_roi_request_t::processed_width

◆ scaling

float dt_dev_roi_request_t::scaling

user zoom, from the viewport

Definition at line 53 of file dev_roi_request.h.

Referenced by _payload_equal(), _update_darkroom_roi(), commit_params(), dt_dev_roi_request_neutral(), and dt_dev_roi_request_publish().

◆ valid

gboolean dt_dev_roi_request_t::valid

Was roi.output_inited. DERIVED at every publication, never asserted and never cleared on its own: it is ‘viewport.configured && geometry.raw_inited && geometry.processed_inited’, i.e. "all three inputs of this record have been published at least once".

It is NOT a statement about which image those numbers describe. Between an image change republishing the raw pair and dt_dev_get_thumbnail_size() rerunning the virtual pipe, processed_* – and everything derived from it – still measures the PREVIOUS image, with valid TRUE throughout. On the darkroom's own image-change path that window contains no running worker (views/darkroom.c's leave() joins it before the new raw geometry is published, and enter() only restarts it after the republish), which is why this record does not try to describe it. Closing it for the other producers needs the geometry setters to publish this record themselves; it is not something this flag can be made to express by clearing it somewhere.

Definition at line 71 of file dev_roi_request.h.

Referenced by _payload_equal(), _update_darkroom_roi(), dt_dev_pixelpipe_has_preview_output(), dt_dev_roi_request_publish(), and dt_dev_roi_request_valid().


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