Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
pixelpipe_gui.h File Reference
#include "develop/develop.h"
+ Include dependency graph for pixelpipe_gui.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void dt_dev_pixelpipe_gui_init (void)
 Initialize GUI-side histogram sampling callbacks.
 
void dt_dev_pixelpipe_gui_cleanup (void)
 Disconnect GUI-side histogram sampling callbacks.
 
dt_backbuf_tdt_dev_get_histogram_backbuf (dt_develop_t *dev, const char *op)
 Return one of the develop-owned global histogram backbuffers.
 
void dt_dev_refresh_preview_histograms (dt_develop_t *dev)
 Refresh all GUI-visible histogram sources from the preview cache.
 
gboolean dt_dev_refresh_module_histogram (dt_develop_t *dev, dt_iop_module_t *module)
 Refresh the histogram owned by one module from the preview cache.
 
gboolean dt_dev_module_requires_global_histogram_output_cache (const dt_dev_pixelpipe_t *pipe, const dt_iop_module_t *module)
 Tell whether the module output itself feeds one global histogram stage.
 
gboolean dt_dev_module_requires_global_histogram_input_cache (const dt_dev_pixelpipe_t *pipe, const dt_iop_module_t *module)
 Tell whether the previous module output feeds one global histogram stage through this module.
 

Function Documentation

◆ dt_dev_get_histogram_backbuf()

dt_backbuf_t * dt_dev_get_histogram_backbuf ( dt_develop_t dev,
const char *  op 
)

Return one of the develop-owned global histogram backbuffers.

Global histogram widgets keep stable dt_backbuf_t containers in dt_develop_t, while the actual cacheline hash they point to is refreshed from the preview pipe on every completed recompute.

References dt_develop_t::display_histogram, dt_develop_t::output_histogram, and dt_develop_t::raw_histogram.

Referenced by _lib_histogram_preview_updated_callback(), _pixelpipe_pick_samples(), _refresh_global_histogram_backbuf(), _set_params(), and _stage_callback().

◆ dt_dev_module_requires_global_histogram_input_cache()

gboolean dt_dev_module_requires_global_histogram_input_cache ( const dt_dev_pixelpipe_t pipe,
const dt_iop_module_t module 
)

Tell whether the previous module output feeds one global histogram stage through this module.

gamma is sampled through its input cacheline because its output is uint8_t while the histogram code expects float host buffers.

References dt_dev_pixelpipe_get_realtime(), DT_DEV_PIXELPIPE_PREVIEW, FALSE, dt_dev_pixelpipe_t::gui_observable_source, dt_iop_module_t::op, and dt_dev_pixelpipe_t::type.

Referenced by _seal_opencl_cache_policy().

◆ dt_dev_module_requires_global_histogram_output_cache()

gboolean dt_dev_module_requires_global_histogram_output_cache ( const dt_dev_pixelpipe_t pipe,
const dt_iop_module_t module 
)

Tell whether the module output itself feeds one global histogram stage.

References dt_dev_pixelpipe_get_realtime(), DT_DEV_PIXELPIPE_PREVIEW, FALSE, dt_dev_pixelpipe_t::gui_observable_source, dt_iop_module_t::op, and dt_dev_pixelpipe_t::type.

Referenced by _seal_opencl_cache_policy().

◆ dt_dev_pixelpipe_gui_cleanup()

void dt_dev_pixelpipe_gui_cleanup ( void  )

Disconnect GUI-side histogram sampling callbacks.

References _preview_pipe_finished_callback(), darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, and darktable_t::signals.

Referenced by dt_dev_cleanup().

◆ dt_dev_pixelpipe_gui_init()

void dt_dev_pixelpipe_gui_init ( void  )

Initialize GUI-side histogram sampling callbacks.

Histogram sampling is performed on the GUI thread after the preview pipe finished and published its cachelines. This initializer connects the preview finished signal to that direct cache sampling path.

References _preview_pipe_finished_callback(), darktable, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, and darktable_t::signals.

Referenced by dt_dev_init().

◆ dt_dev_refresh_module_histogram()

◆ dt_dev_refresh_preview_histograms()

void dt_dev_refresh_preview_histograms ( dt_develop_t dev)

Refresh all GUI-visible histogram sources from the preview cache.

This updates:

  • the three global histogram stage backbuffers (demosaic, colorout, gamma),
  • every module-local histogram requested on the preview pipe.

All reads happen directly from preview cachelines identified through the immutable piece contracts currently present in dev->preview_pipe->nodes.

References _refresh_global_histogram_backbuf(), dt_dev_pixelpipe_iop_t::data, DT_DEV_PIXELPIPE_VALID, dt_dev_refresh_module_histogram(), dt_dev_pixelpipe_iop_t::enabled, dt_develop_t::gui_attached, dt_dev_pixelpipe_t::gui_observable_source, dt_dev_pixelpipe_t::nodes, dt_develop_t::preview_pipe, and dt_dev_pixelpipe_t::status.

Referenced by _preview_pipe_finished_callback(), and _stage_callback().