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

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 _update_darkroom_roi().

◆ box_width

int32_t dt_dev_roi_request_t::box_width

Definition at line 49 of file dev_roi_request.h.

Referenced by _update_darkroom_roi().

◆ center_x

float dt_dev_roi_request_t::center_x

Definition at line 54 of file dev_roi_request.h.

Referenced by _update_darkroom_roi().

◆ 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 _update_darkroom_roi().

◆ 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_darkroom_pipeline().

◆ natural_scale

float dt_dev_roi_request_t::natural_scale

◆ preview_height

int32_t dt_dev_roi_request_t::preview_height

roundf(natural_scale * processed_*)

Definition at line 51 of file dev_roi_request.h.

Referenced by _box_map(), dt_dev_get_thumbnail_size(), dt_dev_pixelpipe_has_preview_output(), and dt_dev_roi_request_preview_height().

◆ preview_width

int32_t dt_dev_roi_request_t::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 _update_darkroom_roi(), and dt_dev_get_thumbnail_size().

◆ processed_width

int32_t dt_dev_roi_request_t::processed_width

Definition at line 50 of file dev_roi_request.h.

Referenced by _update_darkroom_roi(), and dt_dev_get_thumbnail_size().

◆ 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 _update_darkroom_roi(), and commit_params().


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