Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
common.h File Reference

Shared drawlayer runtime helpers used across module/runtime files. More...

+ Include dependency graph for src/iop/drawlayer/common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_iop_drawlayer_params_t
 

Macros

#define DRAWLAYER_NAME_SIZE   64
 
#define DRAWLAYER_PROFILE_SIZE   256
 

Typedefs

typedef struct dt_iop_drawlayer_params_t dt_iop_drawlayer_params_t
 
typedef struct dt_iop_drawlayer_gui_data_t dt_iop_drawlayer_gui_data_t
 
typedef enum dt_drawlayer_runtime_feedback_t dt_drawlayer_runtime_feedback_t
 

Enumerations

enum  dt_drawlayer_runtime_feedback_t {
  DT_DRAWLAYER_RUNTIME_FEEDBACK_NONE = 0 ,
  DT_DRAWLAYER_RUNTIME_FEEDBACK_FOCUS_LOSS_WAIT ,
  DT_DRAWLAYER_RUNTIME_FEEDBACK_SAVE_WAIT
}
 

Functions

gboolean dt_drawlayer_commit_dabs (dt_iop_module_t *self, gboolean record_history)
 
gboolean dt_drawlayer_flush_layer_cache (dt_iop_module_t *self)
 
void dt_drawlayer_flush_process_patch_to_base (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g)
 
gboolean dt_drawlayer_sync_widget_cache (dt_iop_module_t *self)
 
void dt_drawlayer_set_pipeline_realtime_mode (dt_iop_module_t *self, gboolean state)
 
gboolean dt_drawlayer_build_worker_input_dab (dt_iop_module_t *self, dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_raw_input_t *input, dt_drawlayer_brush_dab_t *dab)
 
gboolean dt_drawlayer_prime_live_process_patch_before_stroke (dt_iop_module_t *self)
 
gboolean dt_drawlayer_ensure_layer_cache (dt_iop_module_t *self)
 
gboolean dt_drawlayer_build_process_patch_from_base (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out)
 
void dt_drawlayer_release_all_base_patch_extra_refs (dt_iop_drawlayer_gui_data_t *g)
 
void dt_drawlayer_touch_stroke_commit_hash (dt_iop_drawlayer_params_t *params, int dab_count, gboolean have_last_dab, float last_dab_x, float last_dab_y, uint32_t publish_serial)
 
void dt_drawlayer_begin_gui_stroke_capture (dt_iop_module_t *self, const dt_drawlayer_paint_raw_input_t *first_input)
 
void dt_drawlayer_end_gui_stroke_capture (dt_iop_module_t *self)
 
void dt_drawlayer_show_runtime_feedback (const dt_iop_drawlayer_gui_data_t *g, dt_drawlayer_runtime_feedback_t feedback)
 
void dt_drawlayer_wait_for_rasterization_modal (const dt_iop_drawlayer_gui_data_t *g, const char *title, const char *message)
 
void dt_drawlayer_set_os_cursor_hidden (gboolean hidden)
 
void gui_update (dt_iop_module_t *self)
 Refresh GUI controls from current params and configuration.
 

Detailed Description

Shared drawlayer runtime helpers used across module/runtime files.

Macro Definition Documentation

◆ DRAWLAYER_NAME_SIZE

#define DRAWLAYER_NAME_SIZE   64

◆ DRAWLAYER_PROFILE_SIZE

#define DRAWLAYER_PROFILE_SIZE   256

Typedef Documentation

◆ dt_drawlayer_runtime_feedback_t

◆ dt_iop_drawlayer_gui_data_t

◆ dt_iop_drawlayer_params_t

Enumeration Type Documentation

◆ dt_drawlayer_runtime_feedback_t

Enumerator
DT_DRAWLAYER_RUNTIME_FEEDBACK_NONE 
DT_DRAWLAYER_RUNTIME_FEEDBACK_FOCUS_LOSS_WAIT 
DT_DRAWLAYER_RUNTIME_FEEDBACK_SAVE_WAIT 

Function Documentation

◆ dt_drawlayer_begin_gui_stroke_capture()

◆ dt_drawlayer_build_process_patch_from_base()

◆ dt_drawlayer_build_worker_input_dab()

gboolean dt_drawlayer_build_worker_input_dab ( dt_iop_module_t self,
dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_paint_raw_input_t input,
dt_drawlayer_brush_dab_t dab 
)

References _clamp01(), _mapping_profile_value(), dt_drawlayer_paint_raw_input_t::accel_profile, dt_drawlayer_paint_raw_input_t::acceleration, dt_drawlayer_paint_raw_input_t::brush_flow, dt_drawlayer_paint_raw_input_t::brush_hardness, dt_drawlayer_paint_raw_input_t::brush_mode, dt_drawlayer_paint_raw_input_t::brush_opacity, dt_drawlayer_paint_raw_input_t::brush_radius, dt_drawlayer_paint_raw_input_t::brush_shape, dt_drawlayer_paint_raw_input_t::brush_sprinkle_coarseness, dt_drawlayer_paint_raw_input_t::brush_sprinkle_size, dt_drawlayer_paint_raw_input_t::brush_sprinkles, dt_drawlayer_paint_raw_input_t::color, dt_drawlayer_paint_raw_input_t::display_color, DRAWLAYER_INPUT_MAP_ACCEL_FLOW, DRAWLAYER_INPUT_MAP_ACCEL_OPACITY, DRAWLAYER_INPUT_MAP_ACCEL_SIZE, DRAWLAYER_INPUT_MAP_ACCEL_SOFTNESS, DRAWLAYER_INPUT_MAP_PRESSURE_FLOW, DRAWLAYER_INPUT_MAP_PRESSURE_OPACITY, DRAWLAYER_INPUT_MAP_PRESSURE_SIZE, DRAWLAYER_INPUT_MAP_PRESSURE_SOFTNESS, DRAWLAYER_INPUT_MAP_TILT_FLOW, DRAWLAYER_INPUT_MAP_TILT_OPACITY, DRAWLAYER_INPUT_MAP_TILT_SIZE, DRAWLAYER_INPUT_MAP_TILT_SOFTNESS, DRAWLAYER_PROFILE_INV_QUADRATIC, DRAWLAYER_PROFILE_LINEAR, DT_DEBUG_INPUT, DT_DRAWLAYER_PAINT_STROKE_MIDDLE, dt_drawlayer_widget_to_layer_coords(), dt_print(), FALSE, dt_drawlayer_paint_stroke_t::have_last_input_dab, dt_drawlayer_paint_raw_input_t::have_layer_coords, dt_drawlayer_paint_stroke_t::history, dt_drawlayer_paint_stroke_t::last_input_dab, dt_drawlayer_paint_raw_input_t::lx, dt_drawlayer_paint_raw_input_t::ly, dt_drawlayer_paint_raw_input_t::map_flags, dt_drawlayer_paint_raw_input_t::pressure, dt_drawlayer_paint_raw_input_t::pressure_profile, dt_drawlayer_paint_raw_input_t::stroke_batch, dt_drawlayer_paint_raw_input_t::stroke_pos, dt_drawlayer_paint_raw_input_t::tilt, dt_drawlayer_paint_raw_input_t::tilt_profile, TRUE, dt_drawlayer_paint_raw_input_t::wx, dt_drawlayer_paint_raw_input_t::wy, dt_drawlayer_brush_dab_t::x, and dt_drawlayer_brush_dab_t::y.

Referenced by _paint_build_dab_cb().

◆ dt_drawlayer_commit_dabs()

◆ dt_drawlayer_end_gui_stroke_capture()

void dt_drawlayer_end_gui_stroke_capture ( dt_iop_module_t self)

◆ dt_drawlayer_ensure_layer_cache()

gboolean dt_drawlayer_ensure_layer_cache ( dt_iop_module_t self)

References _default_layer_name(), _drawlayer_params_cache_hash(), _flush_layer_cache, _get_current_work_profile_key(), _invalidate_process_patch(), _layer_cache_matches(), _layerio_append_error(), _layerio_log_errors(), _offer_missing_layer_recreation(), _populate_layer_list(), _release_all_base_patch_extra_refs, _retain_base_patch_loaded_ref(), _sanitize_params(), _sidecar_timestamp_from_path(), drawlayer_dir_info_t::count, dt_drawlayer_io_layer_info_t::count, dt_iop_module_t::dev, DRAWLAYER_NAME_SIZE, DRAWLAYER_PROFILE_SIZE, dt_drawlayer_cache_clear_transparent_float(), dt_drawlayer_cache_patch_alloc_shared(), dt_drawlayer_cache_patch_clear(), dt_drawlayer_cache_patch_rdlock(), dt_drawlayer_cache_patch_rdunlock(), dt_drawlayer_cache_patch_wrlock(), dt_drawlayer_cache_patch_wrunlock(), dt_drawlayer_io_find_layer(), dt_drawlayer_io_load_layer(), dt_drawlayer_io_make_unique_name(), dt_drawlayer_io_sidecar_path(), dt_drawlayer_io_store_layer(), FALSE, drawlayer_dir_info_t::found, dt_drawlayer_io_layer_info_t::found, g, dt_iop_module_t::gui_data, dt_develop_t::gui_module, drawlayer_dir_info_t::height, dt_drawlayer_io_layer_info_t::height, dt_image_t::id, dt_develop_t::image_storage, drawlayer_layer_cache_key_t::imgid, drawlayer_dir_info_t::index, dt_drawlayer_io_layer_info_t::index, dt_develop_t::iop, dt_drawlayer_io_layer_info_t::name, drawlayer_dir_info_t::name, dt_iop_module_t::params, PATH_MAX, dt_develop_t::pipe, dt_develop_t::raw_height, dt_develop_t::raw_width, dt_develop_t::roi, TRUE, drawlayer_dir_info_t::width, dt_drawlayer_io_layer_info_t::width, dt_drawlayer_io_layer_info_t::work_profile, drawlayer_dir_info_t::work_profile, and dt_drawlayer_io_patch_t::x.

Referenced by _perform_runtime_widget_cache_sync(), and dt_drawlayer_runtime_manager_update().

◆ dt_drawlayer_flush_layer_cache()

◆ dt_drawlayer_flush_process_patch_to_base()

◆ dt_drawlayer_prime_live_process_patch_before_stroke()

◆ dt_drawlayer_release_all_base_patch_extra_refs()

◆ dt_drawlayer_set_os_cursor_hidden()

void dt_drawlayer_set_os_cursor_hidden ( gboolean  hidden)

◆ dt_drawlayer_set_pipeline_realtime_mode()

◆ dt_drawlayer_show_runtime_feedback()

◆ dt_drawlayer_sync_widget_cache()

◆ dt_drawlayer_touch_stroke_commit_hash()

void dt_drawlayer_touch_stroke_commit_hash ( dt_iop_drawlayer_params_t params,
int  dab_count,
gboolean  have_last_dab,
float  last_dab_x,
float  last_dab_y,
uint32_t  publish_serial 
)

References dt_hash().

Referenced by _publish_backend_progress().

◆ dt_drawlayer_wait_for_rasterization_modal()

void dt_drawlayer_wait_for_rasterization_modal ( const dt_iop_drawlayer_gui_data_t g,
const char *  title,
const char *  message 
)

◆ gui_update()

void gui_update ( dt_iop_module_t self)

Refresh GUI controls from current params and configuration.

gui callbacks, these are needed.

gui setup and update, these are needed.

Todo:
check why needed
Todo:
by hand

References _aspect_ratio_get(), _autoexp_disable(), _check_tuner_picker_labels(), _colorchecker_rebuild_patch_list(), _colorchecker_update_sliders(), _combo_box_set_active_text(), _conf_brush_mode(), _conf_distance(), _conf_flow(), _conf_hardness(), _conf_hdr_exposure(), _conf_mapping_profile(), _conf_opacity(), _conf_pick_source(), _conf_size(), _conf_smoothing(), _conf_sprinkle_coarseness(), _conf_sprinkle_size(), _conf_sprinkles(), _deflicker_prepare_histogram(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _ensure_layer_name(), _event_aspect_presets_changed(), _get_ashift_params(), _get_exposure_bias(), _make_controls_sensitive(), _params_to_gui(), _populate_layer_list(), _ratio_get_aspect(), _resynch_params(), _rgbcurve_show_hide_controls(), _rgblevels_show_hide_controls(), _sanitize_params(), _shape_is_being_added(), _show_hide_colorspace(), _sync_brush_profile_preview_widget(), _sync_color_picker_from_conf(), _sync_mode_sensitive_widgets(), _sync_preview_bg_buttons(), _temp_array_from_params(), a, dt_noiseprofile_t::a, ASHIFT_MODE_SPECIFIC, aspect_presets_changed(), dt_noiseprofile_t::b, dt_iop_module_t::blend_data, dt_iop_module_t::blend_params, dt_image_t::buf_dsc, c, dt_image_t::camera_maker, dt_image_t::camera_model, camera_set(), ch_L, CHANNELMIXERRGB_V_3, dt_iop_buffer_dsc_t::channels, check_gain_maps(), CLAMPF, color_finetuning_slider(), darktable_t::color_profiles, color_rgb_sliders(), color_temptint_sliders(), COLORRECONSTRUCT_PRECEDENCE_HUE, d, dt_iop_clipping_aspect_t::d, dt_iop_crop_aspect_t::d, darktable, dt_iop_buffer_dsc_t::datatype, dt_iop_lensfun_global_data_t::db, dt_iop_module_t::default_enabled, dt_iop_module_t::default_params, dt_iop_module_t::dev, DITHER_RANDOM, DRAWLAYER_CONF_ACCEL_PROFILE, DRAWLAYER_CONF_MAP_ACCEL_FLOW, DRAWLAYER_CONF_MAP_ACCEL_OPACITY, DRAWLAYER_CONF_MAP_ACCEL_SIZE, DRAWLAYER_CONF_MAP_ACCEL_SOFTNESS, DRAWLAYER_CONF_MAP_PRESSURE_FLOW, DRAWLAYER_CONF_MAP_PRESSURE_OPACITY, DRAWLAYER_CONF_MAP_PRESSURE_SIZE, DRAWLAYER_CONF_MAP_PRESSURE_SOFTNESS, DRAWLAYER_CONF_MAP_TILT_FLOW, DRAWLAYER_CONF_MAP_TILT_OPACITY, DRAWLAYER_CONF_MAP_TILT_SIZE, DRAWLAYER_CONF_MAP_TILT_SOFTNESS, DRAWLAYER_CONF_PRESSURE_PROFILE, DRAWLAYER_CONF_TILT_PROFILE, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_data(), dt_bauhaus_combobox_length(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_from_value(), dt_bauhaus_combobox_set_text(), dt_bauhaus_slider_get(), dt_bauhaus_slider_set(), dt_bauhaus_slider_set_default(), dt_bauhaus_slider_set_hard_max(), dt_bauhaus_slider_set_hard_min(), dt_bauhaus_widget_set_quad_active(), DT_COLORSPACE_ENHANCED_MATRIX, DT_COLORSPACE_FILE, dt_colorspaces_get_name(), dt_colorspaces_is_profile_equal(), dt_colorspaces_is_raw_matrix_profile_type(), dt_conf_get_bool(), dt_conf_get_float(), dt_conf_get_int(), dt_conf_get_string(), dt_conf_key_exists(), dt_control_log(), dt_control_queue_redraw_center(), dt_control_queue_redraw_widget(), DT_DEBUG_COLORPROFILE, DT_DENOISE_PROFILE_ALL, DT_DENOISE_PROFILE_B, DT_DENOISE_PROFILE_Y0, dt_drawlayer_runtime_manager_update(), dt_free, dt_get_color_checker(), dt_gui_hide_collapsible_section(), dt_gui_throttle_cancel(), dt_gui_update_collapsible_section(), dt_image_is_matrix_correction_supported(), dt_image_is_monochrome(), dt_image_is_raw(), dt_image_is_rawprepare_supported(), DT_IMAGE_MONOCHROME, DT_IMAGE_MONOCHROME_BAYER, DT_IOP_BORDERS_ASPECT_COUNT, DT_IOP_BORDERS_POSITION_H_COUNT, DT_IOP_BORDERS_POSITION_V_COUNT, dt_iop_color_picker_reset(), dt_iop_colorreconstruct_bilateral_dump(), dt_iop_denoiseprofile_get_auto_profile(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_IOP_NUM_OF_STD_TEMP_PRESETS, DT_IOP_RETOUCH_BLUR, DT_IOP_RETOUCH_CLONE, DT_IOP_RETOUCH_FILL, DT_IOP_RETOUCH_HEAL, DT_IOP_RGBCURVE_R, DT_IOP_TEMP_AS_SHOT, DT_IOP_TEMP_D65, DT_IOP_TEMP_USER, DT_MASKS_BRUSH, DT_MASKS_CIRCLE, DT_MASKS_EDIT_OFF, DT_MASKS_ELLIPSE, dt_masks_get_from_id(), DT_MASKS_GROUP, DT_MASKS_POLYGON, dt_print(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), DT_SPOT_MODE_CORRECT, dt_wb_preset_interpolate(), DTGTK_EXPANDER, dtgtk_expander_set_expanded(), DTGTK_GRADIENT_SLIDER, dtgtk_gradient_slider_multivalue_set_value(), dtgtk_gradient_slider_multivalue_set_values(), dtgtk_gradient_slider_set_value(), dt_iop_module_t::enabled, eval_grey(), EXPOSURE_MODE_DEFLICKER, EXPOSURE_MODE_MANUAL, FALSE, fc, dt_colorspaces_color_profile_t::filename, filmic_gui_sync_toe_shoulder(), dt_iop_buffer_dsc_t::filters, dt_image_t::flags, g, dt_iop_module_t::global_data, gui_changed(), dt_iop_module_t::gui_data, dt_develop_t::gui_module, gui_update_from_coeffs(), dt_iop_module_t::hide_enable_button, i, dt_develop_t::image_storage, dt_colorspaces_color_profile_t::in_pos, infer_bias_from_profile(), infer_radius_from_profile(), infer_scattering_from_profile(), infer_shadows_from_profile(), invalidate_luminance_cache(), keystone_type_populate(), lens_set(), LENSFUN_MODFLAG_MASK, dt_develop_blend_params_t::mask_id, MASK_NONE, dt_iop_gui_blend_data_t::masks_shown, MODE_NLMEANS, MODE_NLMEANS_AUTO, MODE_RGB, MODE_VARIANCE, MODE_WAVELETS, MODE_WAVELETS_AUTO, MODE_Y0U0V0, model, dt_iop_lensfun_modifier_t::modflag, mul2temp(), n, dt_iop_clipping_aspect_t::n, dt_iop_crop_aspect_t::n, name(), p, dt_iop_module_t::params, parse_model(), darktable_t::plugin_threadsafe, dt_masks_form_t::points, dt_iop_lensfun_modifier_t::pos, preset, dt_colorspaces_t::profiles, reset_mix(), rt_display_selected_fill_color(), rt_display_selected_shapes_lbl(), rt_resynch_params(), rt_shape_is_being_added(), rt_show_forms_for_current_scale(), rt_show_hide_controls(), rt_update_wd_bar_labels(), dt_drawlayer_runtime_context_t::runtime, s_mode_local_laplacian, dt_drawlayer_runtime_request_t::self, show_guiding_controls(), TRUE, dt_colorspaces_color_profile_t::type, dt_masks_form_t::type, TYPE_UINT16, update_balance_slider_colors(), update_colorpicker_color(), update_filepath_combobox(), update_saturation_slider_end_color(), update_saturation_slider_end_color(), update_saturation_slider_end_color(), update_warp_count(), dt_drawlayer_runtime_host_t::user_data, dt_iop_module_t::widget, and dt_colorspaces_color_profile_t::work_pos.

Referenced by _create_new_layer(), _delete_layer_clicked(), _develop_ui_pipe_finished_callback(), _develop_ui_pipe_finished_callback(), _layer_selected(), and dt_drawlayer_runtime_manager_update().