![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include <assert.h>#include <stddef.h>#include <glib/gprintf.h>#include <inttypes.h>#include <math.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include <unistd.h>#include "common/atomic.h"#include "common/datetime.h"#include "common/debug.h"#include "common/history.h"#include "common/image_cache.h"#include "common/imageio.h"#include "common/mipmap_cache.h"#include "common/opencl.h"#include "common/tags.h"#include "control/conf.h"#include "control/control.h"#include "control/signal.h"#include "control/jobs.h"#include "develop/blend.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/lightroom.h"#include "develop/masks.h"#include "develop/pixelpipe_cache.h"#include "develop/pixelpipe_gui.h"#include "gui/gtk.h"#include "gui/gui_throttle.h"#include "gui/presets.h"#include "libs/colorpicker.h"
Include dependency graph for develop.c:Data Structures | |
| struct | dt_dev_multishow_state_t |
Macros | |
| #define | DT_IOP_ORDER_INFO (darktable.unmuted & DT_DEBUG_IOPORDER) |
Typedefs | |
| typedef struct dt_dev_multishow_state_t | dt_dev_multishow_state_t |
Functions | |
| GList * | dt_dev_load_modules (dt_develop_t *dev) |
| void | dt_dev_init (dt_develop_t *dev, int32_t gui_attached) |
| void | dt_dev_cleanup (dt_develop_t *dev) |
| static gboolean | _update_darkroom_roi (dt_develop_t *dev, dt_dev_pixelpipe_t *pipe, int *x, int *y, int *wd, int *ht, float *scale) |
| static void | _flag_pipe (dt_dev_pixelpipe_t *pipe, gboolean error) |
| static gboolean | _darkroom_pipeline_inputs_ready (const dt_develop_t *dev) |
| int | dt_dev_get_thumbnail_size (dt_develop_t *dev) |
| gboolean | dt_dev_pixelpipe_has_preview_output (const dt_develop_t *dev, const dt_dev_pixelpipe_t *pipe, const dt_iop_roi_t *roi) |
| gboolean | dt_dev_pipelines_share_preview_output (dt_develop_t *dev) |
| Tell whether the darkroom main and preview pipes currently target the same GUI output. | |
| void | dt_dev_darkroom_pipeline (dt_develop_t *dev) |
| Run darkroom preview and main pipelines from one background loop. | |
| static int32_t | dt_dev_process_job_run (dt_job_t *job) |
| dt_job_t * | dt_dev_process_job_create (dt_develop_t *dev) |
| void | dt_dev_start_all_pipelines (dt_develop_t *dev) |
| static gboolean | _dt_dev_mipmap_prefetch_full (dt_develop_t *dev, const int32_t imgid) |
| static gboolean | _dt_dev_refresh_image_storage (dt_develop_t *dev, const int32_t imgid) |
| dt_dev_image_storage_t | dt_dev_ensure_image_storage (dt_develop_t *dev, const int32_t imgid) |
| static dt_dev_image_storage_t | _dt_dev_load_raw (dt_develop_t *dev, const int32_t imgid) |
| float | dt_dev_get_zoom_scale (const dt_develop_t *dev, const gboolean preview) |
| dt_dev_image_storage_t | dt_dev_load_image (dt_develop_t *dev, const int32_t imgid) |
| void | dt_dev_configure_real (dt_develop_t *dev, int wd, int ht) |
| void | dt_dev_check_zoom_pos_bounds (dt_develop_t *dev, float *dev_x, float *dev_y, float *box_w, float *box_h) |
| Ensure that the current ROI position is within allowed bounds . | |
| void | dt_dev_get_processed_size (const dt_develop_t *dev, int *procw, int *proch) |
| void | dt_dev_coordinates_widget_delta_to_image_delta (dt_develop_t *dev, const int delta_in, float *delta_out) |
| void | dt_dev_coordinates_widget_to_image_norm (dt_develop_t *dev, float *points, size_t num_points) |
| Coordinate conversion helpers between widget, normalized image, and absolute image spaces. | |
| void | dt_dev_coordinates_image_norm_to_widget (dt_develop_t *dev, float *points, size_t num_points) |
| void | dt_dev_coordinates_image_norm_to_image_abs (dt_develop_t *dev, float *points, size_t num_points) |
| void | dt_dev_coordinates_image_abs_to_image_norm (dt_develop_t *dev, float *points, size_t num_points) |
| void | dt_dev_coordinates_raw_abs_to_raw_norm (dt_develop_t *dev, float *points, size_t num_points) |
| void | dt_dev_coordinates_raw_norm_to_raw_abs (dt_develop_t *dev, float *points, size_t num_points) |
| void | dt_dev_coordinates_image_abs_to_raw_norm (dt_develop_t *dev, float *points, size_t num_points) |
| void | dt_dev_coordinates_image_norm_to_preview_abs (dt_develop_t *dev, float *points, size_t num_points) |
| void | dt_dev_coordinates_preview_abs_to_image_norm (dt_develop_t *dev, float *points, size_t num_points) |
| int | dt_dev_is_current_image (dt_develop_t *dev, int32_t imgid) |
| void | dt_dev_modulegroups_switch (dt_develop_t *dev, dt_iop_module_t *module) |
| void | dt_dev_modulegroups_update_visibility (dt_develop_t *dev) |
| void | dt_dev_masks_list_change (dt_develop_t *dev) |
| void | dt_dev_masks_list_update (dt_develop_t *dev) |
| void | dt_dev_masks_list_remove (dt_develop_t *dev, int formid, int parentid) |
| void | dt_dev_masks_selection_change (dt_develop_t *dev, struct dt_iop_module_t *module, const int selectid, const int throw_event) |
| void | dt_dev_snapshot_request (dt_develop_t *dev, const char *filename) |
| dt_iop_module_t * | dt_dev_module_duplicate (dt_develop_t *dev, dt_iop_module_t *base) |
| void | dt_dev_module_remove (dt_develop_t *dev, dt_iop_module_t *module) |
| void | _dev_module_update_multishow (dt_develop_t *dev, struct dt_iop_module_t *module, const dt_dev_multishow_state_t *state) |
| void | dt_dev_modules_update_multishow (dt_develop_t *dev) |
| gchar * | dt_history_item_get_label (const struct dt_iop_module_t *module) |
| gchar * | dt_dev_get_multi_name (const struct dt_iop_module_t *module) |
| gchar * | dt_dev_get_masks_group_name (const struct dt_iop_module_t *module) |
| gchar * | dt_history_item_get_name (const struct dt_iop_module_t *module) |
| gchar * | dt_history_item_get_name_html (const struct dt_iop_module_t *module) |
| static int | dt_dev_distort_backtransform_locked (dt_develop_t *dev, dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count) |
| int | dt_dev_coordinates_raw_abs_to_image_abs (dt_develop_t *dev, float *points, size_t points_count) |
| int | dt_dev_coordinates_image_abs_to_raw_abs (dt_develop_t *dev, float *points, size_t points_count) |
| int | dt_dev_distort_transform_locked (dt_develop_t *dev, const dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count) |
| int | dt_dev_distort_transform_plus (dt_develop_t *dev, const dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count) |
| int | dt_dev_distort_backtransform_plus (dt_develop_t *dev, dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count) |
| dt_dev_pixelpipe_iop_t * | dt_dev_distort_get_iop_pipe (dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, struct dt_iop_module_t *module) |
| void | dt_dev_reorder_gui_module_list (dt_develop_t *dev) |
| void | dt_dev_undo_start_record (dt_develop_t *dev) |
| void | dt_dev_undo_end_record (dt_develop_t *dev) |
| gboolean | dt_masks_get_lock_mode (dt_develop_t *dev) |
| void | dt_masks_set_lock_mode (dt_develop_t *dev, gboolean mode) |
| int32_t | dt_dev_get_history_end_ext (dt_develop_t *dev) |
| Get the current history end index (GUI perspective). | |
| void | dt_dev_set_history_end_ext (dt_develop_t *dev, const uint32_t index) |
| Set the history end index (GUI perspective). | |
| void | dt_dev_append_changed_tag (const int32_t imgid) |
| void | dt_dev_masks_update_hash (dt_develop_t *dev) |
| float | dt_dev_get_natural_scale (dt_develop_t *dev) |
| float | dt_dev_get_fit_scale (dt_develop_t *dev) |
| Get the scale factor to fit the image into the darkroom area. (scaling * natural_scale_on_processed_size) | |
| float | dt_dev_get_overlay_scale (dt_develop_t *dev) |
| Get the overlay scale factor (scaling * natural_scale_on_processed_size * ppd) | |
| float | dt_dev_get_zoom_level (const dt_develop_t *dev) |
| void | dt_dev_reset_roi (dt_develop_t *dev) |
| gboolean | dt_dev_clip_roi (dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height) |
| Clip the view to the ROI. WARNING: this must be done before any translation. | |
| static gboolean | _dev_translate_roi (dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height) |
| gboolean | dt_dev_rescale_roi (dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height) |
| Scale the ROI to fit within given width/height, centered. | |
| gboolean | dt_dev_rescale_roi_to_input (dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height) |
| Scale the ROI to fit the input size within given width/height, centered. | |
| gboolean | dt_dev_check_zoom_scale_bounds (dt_develop_t *dev) |
| Ensure that the current zoom level is within allowed bounds (for scrolling). | |
| void | dt_dev_update_mouse_effect_radius (dt_develop_t *dev) |
Convert absolute output-image coordinates to input image space by calling dt_dev_coordinates_image_abs_to_raw_abs() directly, then normalize with dt_dev_coordinates_raw_abs_to_raw_norm() when normalized raw coordinates are required. | |
| void | dt_dev_set_backbuf (dt_backbuf_t *backbuf, const int width, const int height, const size_t bpp, const int64_t hash, const int64_t history_hash) |
| #define DT_IOP_ORDER_INFO (darktable.unmuted & DT_DEBUG_IOPORDER) |
| typedef struct dt_dev_multishow_state_t dt_dev_multishow_state_t |
|
static |
References FALSE, dt_develop_t::height, dt_image_t::id, dt_develop_t::image_storage, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::raw_height, dt_develop_t::raw_width, dt_develop_t::roi, and dt_develop_t::width.
Referenced by dt_dev_darkroom_pipeline().
| void _dev_module_update_multishow | ( | dt_develop_t * | dev, |
| struct dt_iop_module_t * | module, | ||
| const dt_dev_multishow_state_t * | state | ||
| ) |
References dt_ioppr_check_can_move_after_iop(), dt_ioppr_check_can_move_before_iop(), dt_iop_module_t::expander, dt_iop_module_t::instance, dt_dev_multishow_state_t::instance_counts, dt_develop_t::iop, dt_iop_module_t::iop_order, dt_dev_multishow_state_t::modules_in_history, dt_iop_module_t::multi_priority, dt_dev_multishow_state_t::next_visible, and dt_dev_multishow_state_t::prev_visible.
Referenced by dt_dev_modules_update_multishow().
|
static |
References darktable, dt_dev_get_processed_size(), dt_dev_get_zoom_level(), FALSE, darktable_t::gui, height, dt_gui_gtk_t::ppd, dt_develop_t::roi, TRUE, width, dt_develop_t::x, and dt_develop_t::y.
Referenced by dt_dev_rescale_roi(), and dt_dev_rescale_roi_to_input().
|
inlinestatic |
References dt_dev_ensure_image_storage(), dt_get_times(), and dt_show_times_f().
Referenced by dt_dev_load_image().
|
static |
References dt_mipmap_buffer_t::buf, darktable, DT_MIPMAP_BLOCKING, dt_mipmap_cache_get, dt_mipmap_cache_release, DT_MIPMAP_FULL, dt_develop_t::gui_attached, dt_mipmap_buffer_t::height, darktable_t::mipmap_cache, dt_develop_t::raw_height, dt_develop_t::raw_inited, dt_develop_t::raw_width, dt_develop_t::roi, TRUE, and dt_mipmap_buffer_t::width.
Referenced by dt_dev_ensure_image_storage().
|
static |
References darktable, dt_image_t::dsc, dt_image_cache_get(), dt_image_cache_read_release(), dt_iop_buffer_dsc_update_bpp(), FALSE, darktable_t::image_cache, dt_develop_t::image_storage, and TRUE.
Referenced by dt_dev_ensure_image_storage().
|
static |
References dt_dev_pixelpipe_t::backbuf, dt_atomic_get_int(), DT_DEBUG_DEV, dt_dev_backbuf_get_hash(), dt_dev_backbuf_get_history_hash(), DT_DEV_PIPE_UNCHANGED, DT_DEV_PIXELPIPE_DIRTY, dt_dev_pixelpipe_get_changed(), dt_dev_pixelpipe_get_hash(), dt_dev_pixelpipe_get_history_hash(), DT_DEV_PIXELPIPE_INVALID, DT_DEV_PIXELPIPE_PREVIEW, DT_DEV_PIXELPIPE_UNDEF, DT_DEV_PIXELPIPE_VALID, dt_print(), error(), dt_dev_pixelpipe_t::processing, dt_dev_pixelpipe_t::shutdown, dt_dev_pixelpipe_t::status, and dt_dev_pixelpipe_t::type.
Referenced by dt_dev_darkroom_pipeline().
|
static |
References darktable, dt_dev_pixelpipe_get_roi_out(), darktable_t::gui, dt_develop_t::height, dt_dev_pixelpipe_t::iheight, dt_dev_pixelpipe_t::iwidth, dt_develop_t::natural_scale, dt_develop_t::output_inited, dt_gui_gtk_t::ppd, dt_develop_t::preview_pipe, dt_develop_t::processed_height, dt_dev_pixelpipe_t::processed_height, dt_develop_t::processed_width, dt_dev_pixelpipe_t::processed_width, dt_develop_t::roi, dt_develop_t::scaling, dt_develop_t::width, x, dt_develop_t::x, and dt_develop_t::y.
Referenced by dt_dev_darkroom_pipeline(), dt_dev_pipelines_share_preview_output(), and dt_dev_pixelpipe_has_preview_output().
| void dt_dev_append_changed_tag | ( | const int32_t | imgid | ) |
References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_TAG_CHANGED, dt_tag_attach(), dt_tag_new(), FALSE, and darktable_t::signals.
Referenced by dt_dev_load_image().
| void dt_dev_check_zoom_pos_bounds | ( | dt_develop_t * | dev, |
| float * | dev_x, | ||
| float * | dev_y, | ||
| float * | box_w, | ||
| float * | box_h | ||
| ) |
Ensure that the current ROI position is within allowed bounds .
| dev | the develop instance |
| dev_x | the normalized x position of ROI |
| dev_y | the normalized y position of ROI |
| box_w | the width of navigation's box |
| box_h | the height of navigation's box |
References CLAMPF, darktable, dt_dev_get_processed_size(), dt_dev_get_zoom_level(), darktable_t::gui, dt_develop_t::height, dt_gui_gtk_t::ppd, dt_develop_t::roi, dt_develop_t::scaling, and dt_develop_t::width.
Referenced by _change_scaling(), _key_scroll(), _lib_navigation_draw_callback(), _lib_navigation_set_position(), _zoom_preset_change(), and mouse_moved().
| gboolean dt_dev_check_zoom_scale_bounds | ( | dt_develop_t * | dev | ) |
Ensure that the current zoom level is within allowed bounds (for scrolling).
| dev | the develop instance |
References darktable, FALSE, darktable_t::gui, dt_develop_t::natural_scale, dt_gui_gtk_t::ppd, dt_develop_t::roi, dt_develop_t::scaling, and TRUE.
Referenced by _change_scaling().
| void dt_dev_cleanup | ( | dt_develop_t * | dev | ) |
References dt_develop_t::allforms, dt_develop_t::alliop, dt_develop_t::allprofile_info, dt_develop_t::chroma_adaptation, dt_develop_t::color_picker, dt_develop_t::colorscheme, dt_conf_set_float(), dt_conf_set_int(), dt_dev_free_history_item(), dt_dev_pixelpipe_cleanup(), dt_dev_pixelpipe_gui_cleanup(), dt_free, dt_free_align, dt_free_gpointer(), dt_gui_throttle_cancel(), dt_iop_cleanup_module(), dt_ioppr_cleanup_profile_info(), dt_masks_free_form(), dt_pthread_rwlock_destroy, dt_pthread_rwlock_unlock, dt_pthread_rwlock_wrlock, dt_develop_t::forms, dt_develop_t::gui_attached, dt_develop_t::histogram_pre_levels, dt_develop_t::histogram_pre_tonecurve, dt_develop_t::history, dt_develop_t::history_mutex, dt_develop_t::iop, dt_develop_t::iop_order_list, dt_develop_t::lower, dt_develop_t::masks_mutex, dt_develop_t::mode, dt_develop_t::overexposed, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_develop_t::primary_sample, dt_develop_t::proxy, dt_develop_t::rawoverexposed, dt_develop_t::threshold, dt_develop_t::undo_history_before_end, dt_develop_t::undo_history_before_iop_order_list, dt_develop_t::undo_history_before_snapshot, dt_develop_t::undo_history_depth, dt_develop_t::upper, dt_develop_t::virtual_pipe, void(), and dt_develop_t::wb_coeffs.
Referenced by _history_compress_apply(), _history_copy_and_paste_on_image_merge(), cleanup(), dt_dev_merge_history_into_image(), dt_focus_draw_clusters(), dt_imageio_export_with_flags(), and dt_styles_apply_to_image_merge().
| gboolean dt_dev_clip_roi | ( | dt_develop_t * | dev, |
| cairo_t * | cr, | ||
| int32_t | width, | ||
| int32_t | height | ||
| ) |
Clip the view to the ROI. WARNING: this must be done before any translation.
| dev | the develop instance |
| cr | the cairo context to clip on |
| width | the view width |
| height | the view height |
References dt_develop_t::border_size, dt_dev_get_overlay_scale(), FALSE, height, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::roi, TRUE, and width.
Referenced by _build_preview_fallback_surface(), expose(), and gui_post_expose().
| void dt_dev_configure_real | ( | dt_develop_t * | dev, |
| int | wd, | ||
| int | ht | ||
| ) |
| void dt_dev_coordinates_image_abs_to_image_norm | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
References i, dt_develop_t::processed_height, dt_develop_t::processed_width, and dt_develop_t::roi.
Referenced by dt_drawlayer_layer_points_to_widget_coords().
| int dt_dev_coordinates_image_abs_to_raw_abs | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | points_count | ||
| ) |
reverse apply all transforms to the specified points (in virtual preview-pipe space)
References dt_dev_distort_backtransform_locked(), DT_DEV_TRANSFORM_DIR_ALL, and dt_develop_t::virtual_pipe.
Referenced by _dt_masks_events_set_current_pos(), dt_dev_coordinates_image_abs_to_raw_norm(), dt_masks_border_from_projected_handle(), dt_masks_rotate_with_anchor(), and dt_masks_set_source_pos_initial_value().
| void dt_dev_coordinates_image_abs_to_raw_norm | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
References dt_dev_coordinates_image_abs_to_raw_abs(), and dt_dev_coordinates_raw_abs_to_raw_norm().
Referenced by _brush_events_button_released(), _brush_events_mouse_moved(), _polygon_events_mouse_moved(), button_released(), dt_masks_gui_delta_to_raw_norm(), and dt_masks_set_source_pos_initial_value().
| void dt_dev_coordinates_image_norm_to_image_abs | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
References i, dt_develop_t::processed_height, dt_develop_t::processed_width, and dt_develop_t::roi.
Referenced by _dt_masks_events_set_current_pos(), dt_drawlayer_widget_points_to_layer_coords(), and get_point_scale().
| void dt_dev_coordinates_image_norm_to_preview_abs | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
References i, dt_develop_t::preview_height, dt_develop_t::preview_width, and dt_develop_t::roi.
Referenced by _picker_sample_box(), button_pressed(), button_released(), gui_post_expose(), mouse_moved(), and set_grad_from_points().
| void dt_dev_coordinates_image_norm_to_widget | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
References darktable, dt_dev_get_zoom_level(), darktable_t::gui, i, dt_develop_t::orig_height, dt_develop_t::orig_width, dt_gui_gtk_t::ppd, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::roi, dt_develop_t::x, and dt_develop_t::y.
Referenced by dt_drawlayer_layer_points_to_widget_coords().
| void dt_dev_coordinates_preview_abs_to_image_norm | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
References i, dt_develop_t::preview_height, dt_develop_t::preview_width, and dt_develop_t::roi.
Referenced by _iop_clipping_set_max_clip(), _polygon_get_sizes(), _set_max_clip(), and set_points_from_grad().
| int dt_dev_coordinates_raw_abs_to_image_abs | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | points_count | ||
| ) |
apply all transforms to the specified points (in virtual preview-pipe space)
References dt_dev_distort_transform_plus(), DT_DEV_TRANSFORM_DIR_ALL, and dt_develop_t::virtual_pipe.
Referenced by _circle_get_points(), _ellipse_get_points(), and _gradient_get_points().
| void dt_dev_coordinates_raw_abs_to_raw_norm | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
| void dt_dev_coordinates_raw_norm_to_raw_abs | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
References i, dt_develop_t::raw_height, dt_develop_t::raw_width, and dt_develop_t::roi.
Referenced by _brush_get_pts_border(), _brush_initial_source_pos(), _circle_get_points_source(), _circle_initial_source_pos(), _ellipse_get_points_source(), _ellipse_initial_source_pos(), _ellipse_points_to_transform(), _gradient_get_points(), _gradient_get_pts_border(), _points_to_transform(), _points_to_transform(), _polygon_initial_source_pos(), and dt_masks_border_from_projected_handle().
| void dt_dev_coordinates_widget_delta_to_image_delta | ( | dt_develop_t * | dev, |
| const int | delta_in, | ||
| float * | delta_out | ||
| ) |
| void dt_dev_coordinates_widget_to_image_norm | ( | dt_develop_t * | dev, |
| float * | points, | ||
| size_t | num_points | ||
| ) |
Coordinate conversion helpers between widget, normalized image, and absolute image spaces.
Widget space is assumed to be the darkroom center view and doesn't account for borders, zooming, panning, etc. RAW space is the full-resolution input fed to the pipeline. Image space is the output image resulting from applying a full history over the full-resolution input. Preview space is the downscaled output image preview as displayed in darkroom.
| dev | develop instance |
| points | pointer to num_points coordinate pairs stored as {x, y}; data is modified in place. |
| num_points | number of coordinate pairs referenced by points. |
References darktable, dt_dev_get_zoom_level(), darktable_t::gui, i, dt_develop_t::orig_height, dt_develop_t::orig_width, dt_gui_gtk_t::ppd, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::roi, dt_develop_t::x, and dt_develop_t::y.
Referenced by _dt_masks_events_set_current_pos(), button_pressed(), button_pressed(), button_released(), dt_drawlayer_widget_points_to_layer_coords(), get_point_scale(), gui_post_expose(), mouse_moved(), mouse_moved(), and scrolled().
| void dt_dev_darkroom_pipeline | ( | dt_develop_t * | dev | ) |
Run darkroom preview and main pipelines from one background loop.
Preview must be serviced before the main pipe so both darkroom pipelines can share freshly-published cachelines without cross-thread timeout heuristics. Pause state, dirty detection, history resync, ROI updates, and re-entry handling stay local to each pipe, but their execution order is now explicit and deterministic.
GUI sampling and picker notifications are intentionally delayed until both ordered pipe runs completed so GUI observers consume the preview-first, main-second cache state from the same loop.
References _darkroom_pipeline_inputs_ready(), _flag_pipe(), _update_darkroom_roi(), dt_dev_pixelpipe_t::backbuf, dt_dev_pixelpipe_t::busy_mutex, dt_develop_t::color_picker, dt_develop_t::completed, darktable, dt_atomic_get_int(), dt_atomic_set_int(), dt_control_log_busy_enter(), dt_control_log_busy_leave(), dt_control_queue_redraw(), dt_control_queue_redraw_center(), dt_control_running(), dt_control_toast_busy_enter(), dt_control_toast_busy_leave(), DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_DEBUG_DEV, DT_DEBUG_PIPE, dt_dev_backbuf_get_hash(), dt_dev_backbuf_get_history_hash(), dt_dev_get_history_hash(), DT_DEV_PIPE_REMOVE, DT_DEV_PIPE_TOP_CHANGED, DT_DEV_PIPE_UNCHANGED, dt_dev_pixelpipe_cache_flush(), dt_dev_pixelpipe_change(), DT_DEV_PIXELPIPE_DIRTY, DT_DEV_PIXELPIPE_FULL, dt_dev_pixelpipe_get_changed(), dt_dev_pixelpipe_get_hash(), dt_dev_pixelpipe_get_history_hash(), dt_dev_pixelpipe_get_realtime(), dt_dev_pixelpipe_has_reentry(), dt_dev_pixelpipe_or_changed(), DT_DEV_PIXELPIPE_PREVIEW, dt_dev_pixelpipe_process(), dt_dev_pixelpipe_reset_reentry(), dt_dev_pixelpipe_set_input(), DT_DEV_PIXELPIPE_UNDEF, DT_DEV_PIXELPIPE_VALID, dt_free, dt_get_times(), dt_gui_throttle_record_runtime(), dt_iop_nap(), DT_MIPMAP_FULL, dt_pixelpipe_get_pipe_name(), dt_print(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_show_times(), DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED, dt_develop_t::exit, FALSE, i, dt_image_t::id, dt_develop_t::image_storage, dt_dev_pixelpipe_t::pause, dt_develop_t::pipe, darktable_t::pixelpipe_cache, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::processing, dt_develop_t::progress, dt_develop_t::raw_height, dt_develop_t::raw_width, dt_develop_t::roi, dt_dev_pixelpipe_t::shutdown, darktable_t::signals, dt_dev_pixelpipe_t::status, dt_develop_t::total, TRUE, dt_dev_pixelpipe_t::type, and x.
Referenced by dt_dev_process_job_run().
|
static |
| int dt_dev_distort_backtransform_plus | ( | dt_develop_t * | dev, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| const double | iop_order, | ||
| const int | transf_direction, | ||
| float * | points, | ||
| size_t | points_count | ||
| ) |
same fct as dt_dev_coordinates_image_abs_to_raw_abs, but we can specify iop with priority between pmin and pmax
References dt_dev_distort_backtransform_locked().
Referenced by _circle_get_mask(), _circle_get_mask_roi(), _commit_box(), _do_get_structure_quad(), _draw_save_lines_to_params(), _ellipse_get_mask(), _ellipse_get_mask_roi(), _gradient_get_mask(), _gradient_get_mask_roi(), _picker_sample_box(), button_pressed(), button_released(), commit_box(), dt_drawlayer_widget_points_to_layer_coords(), get_point_scale(), mouse_moved(), process(), process(), and set_grad_from_points().
| dt_dev_pixelpipe_iop_t * dt_dev_distort_get_iop_pipe | ( | dt_develop_t * | dev, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_iop_module_t * | module | ||
| ) |
get the iop_pixelpipe instance corresponding to the iop in the given pipe
References dt_dev_pixelpipe_t::nodes.
Referenced by _aspect_ratio_get(), _build_pre_module_filter_string(), _commit_box(), _create_background_layer_from_input(), _do_get_structure_auto(), _do_get_structure_lines(), _do_get_structure_quad(), _draw_retrieve_lines_from_params(), _iop_clipping_set_max_clip(), _ratio_get_aspect(), _set_max_clip(), _sync_private_buffer_from_preview_cache(), _virtual_piece_input_offset(), button_pressed(), call_distort_transform(), commit_box(), dt_drawlayer_prime_live_process_patch_before_stroke(), gui_focus(), gui_post_expose(), mouse_moved(), set_grad_from_points(), and set_points_from_grad().
| int dt_dev_distort_transform_locked | ( | dt_develop_t * | dev, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const double | iop_order, | ||
| const int | transf_direction, | ||
| float * | points, | ||
| size_t | points_count | ||
| ) |
References DT_DEV_TRANSFORM_DIR_ALL, DT_DEV_TRANSFORM_DIR_FORW_INCL, dt_dev_pixelpipe_iop_t::enabled, and dt_dev_pixelpipe_t::nodes.
Referenced by _distort_paths(), and dt_dev_distort_transform_plus().
| int dt_dev_distort_transform_plus | ( | dt_develop_t * | dev, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const double | iop_order, | ||
| const int | transf_direction, | ||
| float * | points, | ||
| size_t | points_count | ||
| ) |
References dt_dev_distort_transform_locked().
Referenced by _brush_get_pts_border(), _circle_get_area(), _circle_get_mask_roi(), _circle_get_points_source(), _circle_get_source_area(), _distort_paths(), _draw_retrieve_lines_from_params(), _ellipse_get_area(), _ellipse_get_mask_roi(), _ellipse_get_points_source(), _ellipse_get_source_area(), _get_selected_area(), _get_selected_area(), _gradient_get_area(), _iop_clipping_set_max_clip(), _polygon_get_pts_border(), _process(), _set_max_clip(), button_pressed(), dt_dev_coordinates_raw_abs_to_image_abs(), dt_drawlayer_layer_points_to_widget_coords(), dt_focus_draw_clusters(), get_points(), gui_post_expose(), masks_point_calc_delta(), rt_masks_point_calc_delta(), and set_points_from_grad().
| dt_dev_image_storage_t dt_dev_ensure_image_storage | ( | dt_develop_t * | dev, |
| const int32_t | imgid | ||
| ) |
References _dt_dev_mipmap_prefetch_full(), _dt_dev_refresh_image_storage(), darktable, DT_DEV_IMAGE_STORAGE_DB_NOT_READ, DT_DEV_IMAGE_STORAGE_MIPMAP_NOT_FOUND, DT_DEV_IMAGE_STORAGE_OK, and darktable_t::image_cache.
Referenced by _dt_dev_load_raw(), _styles_init_source_dev(), dt_dev_pop_history_items_ext(), dt_dev_read_history_ext(), and dt_dev_replace_history_on_image().
| float dt_dev_get_fit_scale | ( | dt_develop_t * | dev | ) |
Get the scale factor to fit the image into the darkroom area. (scaling * natural_scale_on_processed_size)
| dev | the develop instance |
References dt_develop_t::height, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::roi, dt_develop_t::scaling, and dt_develop_t::width.
Referenced by _build_preview_fallback_surface(), _darkroom_pickers_draw(), dt_dev_get_overlay_scale(), and dt_dev_rescale_roi().
| int32_t dt_dev_get_history_end_ext | ( | struct dt_develop_t * | dev | ) |
Get the current history end index (GUI perspective).
The index is 1-based with 0 representing the raw input image. The value is sanitized against the actual history length.
| dev | Develop context. |
References dt_develop_t::history, and dt_develop_t::history_end.
Referenced by _hm_backup_dest(), _hm_build_last_history_by_id(), _hm_build_override_map(), _hm_truncate_dest_redo_tail(), _lib_history_change_callback(), _lib_history_view_selection_changed(), _lib_snapshots_add_button_clicked_callback(), _remove_history_leaks(), dt_dev_add_history_item_real(), dt_dev_history_compress_or_truncate(), dt_dev_history_compute_hash(), dt_dev_history_truncate(), dt_dev_history_undo_end_record_locked(), dt_dev_history_undo_start_record_locked(), dt_dev_module_remove(), dt_dev_modules_update_multishow(), dt_dev_pixelpipe_synch_all_real(), dt_dev_pixelpipe_synch_top(), dt_dev_pop_history_items_ext(), dt_dev_write_history_ext(), dt_history_merge(), dt_masks_cleanup_unused(), dt_masks_read_masks_history(), and dt_styles_apply_to_image_merge().
| gchar * dt_dev_get_masks_group_name | ( | const struct dt_iop_module_t * | module | ) |
Get the module multi name, or the module name if no multi name is provided
References dt_dev_get_multi_name(), dt_free, and dt_history_item_get_name().
Referenced by _blendop_masks_group_name_commit(), _set_group_name_from_module(), and dt_iop_gui_init_masks().
| gchar * dt_dev_get_multi_name | ( | const struct dt_iop_module_t * | module | ) |
generates item multi-instance name without mnemonics
References dt_iop_module_t::multi_name.
Referenced by dt_dev_get_masks_group_name().
| float dt_dev_get_natural_scale | ( | dt_develop_t * | dev | ) |
References darktable, darktable_t::gui, dt_develop_t::gui_inited, dt_develop_t::height, dt_gui_gtk_t::ppd, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::raw_inited, dt_develop_t::roi, and dt_develop_t::width.
Referenced by dt_dev_get_thumbnail_size(), and gui_post_expose().
| float dt_dev_get_overlay_scale | ( | dt_develop_t * | dev | ) |
Get the overlay scale factor (scaling * natural_scale_on_processed_size * ppd)
| dev | the develop instance |
References darktable, dt_dev_get_fit_scale(), darktable_t::gui, and dt_gui_gtk_t::ppd.
Referenced by _draw_near_point(), button_pressed(), dt_dev_clip_roi(), dt_drawlayer_compute_view_patch(), expose(), gui_post_expose(), gui_post_expose(), and mouse_moved().
| void dt_dev_get_processed_size | ( | const dt_develop_t * | dev, |
| int * | procw, | ||
| int * | proch | ||
| ) |
References dt_develop_t::processed_height, dt_develop_t::processed_width, and dt_develop_t::roi.
Referenced by _aspect_apply(), _aspect_ratio_get(), _change_scaling(), _dev_translate_roi(), _lib_navigation_set_position(), _ratio_get_aspect(), apply_box_aspect(), dt_dev_check_zoom_pos_bounds(), dt_masks_events_post_expose(), and gui_post_expose().
| int dt_dev_get_thumbnail_size | ( | dt_develop_t * | dev | ) |
References DT_DEBUG_DEV, dt_dev_get_history_hash(), dt_dev_get_natural_scale(), DT_DEV_PIPE_REMOVE, DT_DEV_PIPE_SYNCH, DT_DEV_PIPE_UNCHANGED, dt_dev_pixelpipe_change(), dt_dev_pixelpipe_get_changed(), dt_dev_pixelpipe_get_history_hash(), dt_dev_pixelpipe_get_roi_out(), dt_dev_pixelpipe_or_changed(), dt_dev_pixelpipe_set_input(), dt_dev_update_mouse_effect_radius(), DT_MIPMAP_FULL, dt_print(), dt_develop_t::gui_inited, dt_image_t::id, dt_dev_pixelpipe_t::iheight, dt_dev_pixelpipe_t::image, dt_develop_t::image_storage, dt_dev_pixelpipe_t::imgid, dt_dev_pixelpipe_t::iwidth, dt_develop_t::natural_scale, dt_dev_pixelpipe_t::nodes, dt_develop_t::output_inited, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::raw_height, dt_develop_t::raw_inited, dt_develop_t::raw_width, dt_develop_t::roi, TRUE, and dt_develop_t::virtual_pipe.
Referenced by _darkroom_image_loaded_callback(), _enter_edit_mode(), _enter_edit_mode(), _event_commit_clicked(), _event_commit_clicked(), dt_dev_add_history_item_real(), dt_dev_configure_real(), dt_dev_pop_history_items(), and gui_focus().
| float dt_dev_get_zoom_level | ( | const dt_develop_t * | dev | ) |
References dt_develop_t::natural_scale, dt_develop_t::roi, and dt_develop_t::scaling.
Referenced by _change_scaling(), _dev_translate_roi(), dt_dev_check_zoom_pos_bounds(), dt_dev_coordinates_image_norm_to_widget(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_rescale_roi_to_input(), dt_dev_update_mouse_effect_radius(), dt_masks_events_post_expose(), key_pressed(), and mouse_moved().
| float dt_dev_get_zoom_scale | ( | const dt_develop_t * | dev, |
| const gboolean | preview | ||
| ) |
| void dt_dev_init | ( | dt_develop_t * | dev, |
| int32_t | gui_attached | ||
| ) |
References dt_develop_t::color_picker, dt_develop_t::colorscheme, dt_develop_t::display_histogram, dt_develop_t::display_samples, dt_conf_get_bool(), dt_conf_get_float(), dt_conf_get_int(), dt_dev_load_modules(), dt_dev_pixelpipe_gui_init(), dt_dev_pixelpipe_init(), dt_dev_pixelpipe_init_preview(), dt_dev_reset_roi(), dt_dev_set_backbuf(), dt_dev_set_history_hash(), dt_image_init(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_pthread_rwlock_init, dt_develop_t::gui_attached, dt_develop_t::height, dt_develop_t::histogram_pre_levels, dt_develop_t::histogram_pre_levels_max, dt_develop_t::histogram_pre_tonecurve, dt_develop_t::histogram_pre_tonecurve_max, dt_develop_t::history_mutex, dt_develop_t::image_storage, dt_develop_t::iop, dt_develop_t::live_samples_enabled, dt_develop_t::lower, dt_develop_t::masks_mutex, dt_develop_t::mode, dt_develop_t::output_histogram, dt_develop_t::overexposed, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_develop_t::primary_sample, dt_develop_t::proxy, dt_develop_t::raw_histogram, dt_develop_t::rawoverexposed, dt_develop_t::restrict_histogram, dt_develop_t::roi, dt_develop_t::threshold, TRUE, dt_develop_t::upper, dt_develop_t::virtual_pipe, dt_develop_t::wb_coeffs, dt_develop_t::wb_is_D65, and dt_develop_t::width.
Referenced by _history_compress_apply(), _history_copy_and_paste_on_image_merge(), _styles_init_source_dev(), dt_dev_merge_history_into_image(), dt_focus_draw_clusters(), dt_imageio_export_with_flags(), and init().
| int dt_dev_is_current_image | ( | dt_develop_t * | dev, |
| int32_t | imgid | ||
| ) |
checks if provided imgid is the image currently in develop
References dt_image_t::id, and dt_develop_t::image_storage.
| dt_dev_image_storage_t dt_dev_load_image | ( | dt_develop_t * | dev, |
| const int32_t | imgid | ||
| ) |
References _dt_dev_load_raw(), darktable, darktable_t::develop, dt_dev_append_changed_tag(), dt_dev_history_notify_change(), dt_dev_read_history_ext(), dt_dev_write_history_ext(), dt_image_cache_get(), DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), dt_pthread_rwlock_unlock, dt_pthread_rwlock_wrlock, dt_develop_t::history_mutex, darktable_t::image_cache, and dt_develop_t::image_storage.
Referenced by dt_focus_draw_clusters(), dt_imageio_export_with_flags(), and enter().
| GList * dt_dev_load_modules | ( | dt_develop_t * | dev | ) |
References darktable, dt_free, dt_iop_load_module_by_so(), dt_sort_iop_by_order(), and darktable_t::iop.
Referenced by dt_dev_init(), dt_dev_read_history_ext(), and enter().
| void dt_dev_masks_list_change | ( | dt_develop_t * | dev | ) |
References dt_develop_t::list_change, dt_develop_t::masks, and dt_develop_t::proxy.
Referenced by dt_dev_read_history_ext().
| void dt_dev_masks_list_remove | ( | dt_develop_t * | dev, |
| int | formid, | ||
| int | parentid | ||
| ) |
References dt_develop_t::list_remove, dt_develop_t::masks, and dt_develop_t::proxy.
| void dt_dev_masks_list_update | ( | dt_develop_t * | dev | ) |
References dt_develop_t::list_update, dt_develop_t::masks, and dt_develop_t::proxy.
Referenced by dt_dev_add_history_item_real().
| void dt_dev_masks_selection_change | ( | dt_develop_t * | dev, |
| struct dt_iop_module_t * | module, | ||
| const int | selectid, | ||
| const int | throw_event | ||
| ) |
References dt_develop_t::masks, dt_develop_t::proxy, and dt_develop_t::selection_change.
Referenced by _blendop_masks_all_selection_changed(), _blendop_masks_group_selection_changed(), _tree_add_exist(), _tree_duplicate_shape(), dt_masks_events_button_released(), dt_masks_gui_form_save_creation(), and dt_masks_set_edit_mode().
| void dt_dev_masks_update_hash | ( | dt_develop_t * | dev | ) |
integrity hash of the forms/shapes stack
References dt_masks_group_get_hash(), dt_develop_t::forms, dt_develop_t::forms_changed, and dt_develop_t::forms_hash.
Referenced by _delayed_history_commit(), and dt_dev_read_history_ext().
| dt_iop_module_t * dt_dev_module_duplicate | ( | dt_develop_t * | dev, |
| dt_iop_module_t * | base | ||
| ) |
duplicate a existent module
References dt_iop_module_t::dev, dt_iop_load_module(), dt_iop_update_multi_priority(), dt_ioppr_insert_module_instance(), dt_ioppr_move_iop_after(), dt_sort_iop_by_order(), FALSE, dt_iop_module_t::instance, dt_develop_t::iop, dt_iop_module_t::multi_name, dt_iop_module_t::multi_priority, dt_iop_module_t::so, and TRUE.
| void dt_dev_module_remove | ( | dt_develop_t * | dev, |
| struct dt_iop_module_t * | module | ||
| ) |
remove an existent module
References DT_DEBUG_HISTORY, dt_dev_free_history_item(), dt_dev_get_history_end_ext(), dt_dev_history_undo_end_record_locked(), dt_dev_history_undo_invalidate_module(), dt_dev_history_undo_start_record_locked(), dt_dev_set_history_end_ext(), dt_print(), dt_pthread_rwlock_unlock, dt_pthread_rwlock_wrlock, dt_develop_t::gui_attached, dt_develop_t::history, dt_develop_t::history_mutex, dt_develop_t::iop, MAX, and dt_dev_history_item_t::multi_name.
Referenced by _gui_delete_callback().
| void dt_dev_modulegroups_switch | ( | dt_develop_t * | dev, |
| struct dt_iop_module_t * | module | ||
| ) |
request modulegroups to show the group of the given module
References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_DEVELOP_MODULEGROUPS_SET, and darktable_t::signals.
Referenced by _history_show_module_for_end(), and default_iop_focus().
| void dt_dev_modulegroups_update_visibility | ( | dt_develop_t * | dev | ) |
update modulegroup visibility
References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_DEVELOP_MODULEGROUPS_SET, and darktable_t::signals.
Referenced by _gui_off_callback(), dt_iop_gui_duplicate(), and gui_reset().
| void dt_dev_modules_update_multishow | ( | dt_develop_t * | dev | ) |
same, but for all modules
References _dev_module_update_multishow(), dt_dev_get_history_end_ext(), dt_iop_gui_module_is_visible(), dt_ioppr_check_iop_order(), dt_develop_t::history, dt_iop_module_t::instance, dt_dev_multishow_state_t::instance_counts, dt_develop_t::iop, key, dt_dev_multishow_state_t::modules_in_history, dt_dev_multishow_state_t::next_visible, and dt_dev_multishow_state_t::prev_visible.
Referenced by _gui_delete_callback(), _gui_movedown_callback(), _gui_moveup_callback(), _on_drag_data_received(), and dt_iop_gui_duplicate().
| gboolean dt_dev_pipelines_share_preview_output | ( | dt_develop_t * | dev | ) |
Tell whether the darkroom main and preview pipes currently target the same GUI output.
When both pipes would render the same geometry, preview must run first so the main pipe can reuse its backbuffer instead of recomputing the same image concurrently.
References _update_darkroom_roi(), FALSE, dt_develop_t::gui_attached, dt_develop_t::output_inited, dt_develop_t::pipe, dt_develop_t::preview_pipe, and dt_develop_t::roi.
| gboolean dt_dev_pixelpipe_has_preview_output | ( | const dt_develop_t * | dev, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_iop_roi_t * | roi | ||
| ) |
References _update_darkroom_roi(), FALSE, dt_develop_t::gui_attached, height, dt_iop_roi_t::height, dt_develop_t::natural_scale, dt_develop_t::output_inited, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::roi, dt_iop_roi_t::scale, width, dt_iop_roi_t::width, x, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _brush_get_mask(), _brush_get_mask_roi(), _brush_get_pts_border(), _polygon_get_mask(), _polygon_get_mask_roi(), _polygon_get_pts_border(), _process_common_setup(), commit_params(), commit_params(), commit_params_late(), distort_backtransform(), distort_transform(), nlmeans_scattering(), process(), process(), process_common_cleanup(), process_common_setup(), process_cpu(), process_drago(), process_variance(), process_wavelets(), and toneeq_process().
| dt_job_t * dt_dev_process_job_create | ( | dt_develop_t * | dev | ) |
References dt_control_job_create(), dt_control_job_set_params(), and dt_dev_process_job_run().
Referenced by dt_dev_start_all_pipelines().
|
static |
References dt_control_job_get_params(), and dt_dev_darkroom_pipeline().
Referenced by dt_dev_process_job_create().
| void dt_dev_reorder_gui_module_list | ( | dt_develop_t * | dev | ) |
reorder the module list
References darktable, DT_UI_CONTAINER_PANEL_RIGHT_CENTER, dt_ui_get_container(), darktable_t::gui, dt_develop_t::iop, and dt_gui_gtk_t::ui.
| gboolean dt_dev_rescale_roi | ( | dt_develop_t * | dev, |
| cairo_t * | cr, | ||
| int32_t | width, | ||
| int32_t | height | ||
| ) |
Scale the ROI to fit within given width/height, centered.
| dev | the develop instance |
| cr | the cairo context to draw on |
| width | the widget width |
| height | the widget height |
References _dev_translate_roi(), dt_dev_get_fit_scale(), FALSE, height, TRUE, and width.
Referenced by _build_preview_fallback_surface(), _darkroom_pickers_draw(), expose(), and gui_post_expose().
| gboolean dt_dev_rescale_roi_to_input | ( | dt_develop_t * | dev, |
| cairo_t * | cr, | ||
| int32_t | width, | ||
| int32_t | height | ||
| ) |
Scale the ROI to fit the input size within given width/height, centered.
| dev | the develop instance |
| cr | the cairo context to draw on |
| width | the widget width |
| height | the widget height |
References _dev_translate_roi(), darktable, dt_dev_get_zoom_level(), FALSE, darktable_t::gui, height, dt_gui_gtk_t::ppd, TRUE, and width.
Referenced by dt_masks_events_post_expose(), and gui_post_expose().
| void dt_dev_reset_roi | ( | dt_develop_t * | dev | ) |
References dt_develop_t::natural_scale, dt_develop_t::roi, dt_develop_t::scaling, dt_develop_t::x, and dt_develop_t::y.
Referenced by dt_dev_init(), and reset().
| void dt_dev_set_backbuf | ( | dt_backbuf_t * | backbuf, |
| const int | width, | ||
| const int | height, | ||
| const size_t | bpp, | ||
| const int64_t | hash, | ||
| const int64_t | history_hash | ||
| ) |
References dt_backbuf_t::bpp, bpp, dt_dev_backbuf_set_hash(), dt_dev_backbuf_set_history_hash(), height, dt_backbuf_t::height, width, and dt_backbuf_t::width.
Referenced by _clear_histogram_backbuf(), _refresh_global_histogram_backbuf(), _update_backbuf_cache_reference(), dt_dev_init(), dt_dev_pixelpipe_cleanup(), and dt_dev_pixelpipe_init_cached().
| void dt_dev_set_history_end_ext | ( | struct dt_develop_t * | dev, |
| const uint32_t | index | ||
| ) |
Set the history end index (GUI perspective).
The index is 1-based with 0 representing the raw input image. The value is sanitized against the actual history length.
| dev | Develop context. |
| index | New history end index. |
References dt_dev_history_compute_hash(), dt_dev_set_history_hash(), dt_develop_t::history, and dt_develop_t::history_end.
Referenced by _dt_dev_history_compress_internal(), _history_apply_history_end(), _hm_restore_dest_from_backup(), _pop_undo(), _styles_rebuild_history_from_items(), dt_dev_add_history_item_ext(), dt_dev_module_remove(), dt_dev_read_history_ext(), and dt_history_merge().
| void dt_dev_snapshot_request | ( | dt_develop_t * | dev, |
| const char * | filename | ||
| ) |
request snapshot
References dt_control_queue_redraw_center(), dt_develop_t::filename, dt_develop_t::proxy, dt_develop_t::request, dt_develop_t::snapshot, and TRUE.
Referenced by _lib_snapshots_add_button_clicked_callback().
| void dt_dev_start_all_pipelines | ( | dt_develop_t * | dev | ) |
References darktable_t::control, darktable, dt_control_add_job_res(), DT_CTL_WORKER_DARKROOM, dt_dev_process_job_create(), dt_develop_t::pipelines_started, and TRUE.
Referenced by _darkroom_image_loaded_callback().
| void dt_dev_undo_end_record | ( | dt_develop_t * | dev | ) |
References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_dev_history_undo_end_record(), DT_SIGNAL_DEVELOP_HISTORY_CHANGE, DT_VIEW_DARKROOM, dt_view_manager_get_current_view(), dt_develop_t::gui_attached, darktable_t::signals, and darktable_t::view_manager.
Referenced by _darkroom_image_loaded_callback(), _gui_delete_callback(), _history_apply_history_end(), _styles_apply_callback(), compress_history_callback(), delete_history_callback(), dt_dev_add_history_item_real(), dt_drawlayer_commit_dabs(), gui_focus(), and gui_reset().
| void dt_dev_undo_start_record | ( | dt_develop_t * | dev | ) |
References darktable, dt_dev_history_undo_start_record(), DT_VIEW_DARKROOM, dt_view_manager_get_current_view(), dt_develop_t::gui_attached, and darktable_t::view_manager.
Referenced by _darkroom_image_loaded_callback(), _gui_delete_callback(), _history_apply_history_end(), _styles_apply_callback(), compress_history_callback(), delete_history_callback(), dt_dev_add_history_item_real(), dt_drawlayer_commit_dabs(), gui_focus(), and gui_reset().
| void dt_dev_update_mouse_effect_radius | ( | dt_develop_t * | dev | ) |
Convert absolute output-image coordinates to input image space by calling dt_dev_coordinates_image_abs_to_raw_abs() directly, then normalize with dt_dev_coordinates_raw_abs_to_raw_norm() when normalized raw coordinates are required.
References darktable, DT_DEBUG_MASKS, dt_dev_get_zoom_level(), DT_PIXEL_APPLY_DPI, dt_print(), dt_gui_gtk_t::effect_radius, dt_gui_gtk_t::effect_radius_scaled, darktable_t::gui, dt_gui_gtk_t::mouse, and dt_gui_gtk_t::ppd.
Referenced by dt_dev_get_thumbnail_size(), and dt_dev_pixelpipe_change_zoom_main().
| gchar * dt_history_item_get_label | ( | const struct dt_iop_module_t * | module | ) |
generate item multi-instance name with mnemonics, for Gtk labels
References dt_iop_module_t::multi_name.
Referenced by _iop_panel_label().
| gchar * dt_history_item_get_name | ( | const struct dt_iop_module_t * | module | ) |
References delete_underscore(), dt_free, and dt_iop_module_t::multi_name.
Referenced by _blendop_masks_group_create(), _gui_off_callback(), _lib_masks_blending_gui_changed_callback(), _mask_indicator_tooltip(), _print_nan_debug(), _print_perf_debug(), _tree_format_form_usage_label(), dt_dev_get_masks_group_name(), dt_dev_pixelpipe_process_rec(), dt_iop_set_mask_mode(), and dt_masks_iop_combo_populate().
| gchar * dt_history_item_get_name_html | ( | const struct dt_iop_module_t * | module | ) |
References delete_underscore(), dt_free, and dt_iop_module_t::multi_name.
| gboolean dt_masks_get_lock_mode | ( | dt_develop_t * | dev | ) |
References darktable, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), FALSE, darktable_t::gui, dt_develop_t::gui_attached, dt_develop_t::mask_lock, and dt_gui_gtk_t::mutex.
Referenced by mask_lock_callback().
| void dt_masks_set_lock_mode | ( | dt_develop_t * | dev, |
| gboolean | mode | ||
| ) |
References darktable, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), darktable_t::gui, dt_develop_t::gui_attached, dt_develop_t::mask_lock, and dt_gui_gtk_t::mutex.
Referenced by mask_lock_callback().