![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Drawlayer module entrypoints and runtime orchestration. More...
#include "bauhaus/bauhaus.h"#include "common/colorspaces_inline_conversions.h"#include "common/dtpthread.h"#include "common/image.h"#include "common/imagebuf.h"#include "common/imageio.h"#include "common/imageio_module.h"#include "common/iop_profile.h"#include "common/opencl.h"#include "control/conf.h"#include "control/control.h"#include "control/jobs.h"#include "develop/blend.h"#include "develop/dev_history.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "develop/imageop_math.h"#include "develop/noise_generator.h"#include "develop/pixelpipe_cache.h"#include "gui/color_picker_proxy.h"#include "gui/gtk.h"#include "gui/gui_throttle.h"#include "iop/drawlayer/brush.h"#include "iop/drawlayer/cache.h"#include "iop/drawlayer/common.h"#include "iop/drawlayer/coordinates.h"#include "iop/drawlayer/io.h"#include "iop/drawlayer/paint.h"#include "iop/drawlayer/runtime.h"#include "iop/drawlayer/widgets.h"#include "iop/drawlayer/worker.h"#include "iop/iop_api.h"#include <glib/gstdio.h>#include <inttypes.h>#include <limits.h>#include <math.h>#include <sched.h>#include <stdlib.h>#include <string.h>#include "drawlayer/conf.c"#include "drawlayer/coordinates.c"#include "drawlayer/worker.c"
Include dependency graph for drawlayer.c:Data Structures | |
| struct | drawlayer_dir_info_t |
| struct | dt_iop_drawlayer_data_t |
| struct | drawlayer_preview_background_t |
| struct | drawlayer_layer_cache_key_t |
| struct | drawlayer_wait_dialog_t |
| struct | drawlayer_process_scratch_t |
| struct | drawlayer_modal_wait_state_t |
| struct | drawlayer_hud_brush_state_t |
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) |
| static void | _flush_process_patch_to_base_locked (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g) |
| static void | _sync_mode_sensitive_widgets (dt_iop_module_t *self) |
| 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) |
| static int | _offer_missing_layer_recreation (dt_iop_module_t *self, const char *missing_name) |
| static gboolean | _background_layer_job_done_idle (gpointer user_data) |
| gboolean | dt_drawlayer_prime_live_process_patch_before_stroke (dt_iop_module_t *self) |
| static dt_drawlayer_runtime_result_t | _update_gui_runtime_manager (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g, dt_drawlayer_runtime_event_t event, gboolean flush_pending) |
| static gboolean | _is_drawlayer_display_pipe (const dt_iop_module_t *self, const dt_dev_pixelpipe_iop_t *piece) |
| static float | _clamp01 (const float value) |
| static void | _get_brush_colors (dt_iop_module_t *self, float display_rgb[3], float pipeline_rgb[3]) |
| static float | _mapping_profile_value (const drawlayer_mapping_profile_t profile, const float x) |
| static void | _fill_input_brush_settings (dt_iop_module_t *self, dt_drawlayer_paint_raw_input_t *input) |
| static void | _fill_input_layer_coords (dt_iop_module_t *self, dt_drawlayer_paint_raw_input_t *input) |
| static void | _default_layer_name (dt_iop_module_t *self, char *name, const size_t name_size) |
| static gboolean | _layer_name_non_empty (const char *name) |
| static gboolean | _get_current_work_profile_key (dt_iop_module_t *self, GList *iop_list, dt_dev_pixelpipe_t *pipe, char *key, const size_t key_size) |
| static void | _ensure_layer_name (dt_iop_module_t *self, dt_iop_drawlayer_params_t *params) |
| static void | _destroy_process_scratch (gpointer data) |
| static drawlayer_process_scratch_t * | _get_process_scratch (void) |
| static uint64_t | _drawlayer_params_cache_hash (const int32_t imgid, const dt_iop_drawlayer_params_t *params) |
| static gboolean | _rekey_shared_base_patch (drawlayer_patch_t *patch, const int32_t imgid, const dt_iop_drawlayer_params_t *params) |
| static void | _retain_base_patch_loaded_ref (dt_iop_drawlayer_gui_data_t *g) |
| static void | _retain_base_patch_stroke_ref (dt_iop_drawlayer_gui_data_t *g) |
| void | dt_drawlayer_release_all_base_patch_extra_refs (dt_iop_drawlayer_gui_data_t *g) |
| static gboolean | _refresh_piece_base_cache (dt_iop_module_t *self, dt_iop_drawlayer_data_t *data, const dt_iop_drawlayer_params_t *params, dt_dev_pixelpipe_iop_t *piece) |
| 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) |
| static void | _blend_layer_over_input (float *output, const float *input, const float *layerbuf, const size_t pixels, const gboolean use_preview_bg, const float preview_bg) |
| static gboolean | _profile_key_is_sane (const char *value) |
| static int64_t | _sidecar_timestamp_from_path (const char *path) |
| static void | _ensure_cursor_stamp_surface (dt_iop_module_t *self, const float widget_radius, const float opacity, const float hardness) |
| void | dt_drawlayer_set_os_cursor_hidden (const gboolean hidden) |
| static drawlayer_wait_dialog_t | _show_drawlayer_wait_dialog (const char *title, const char *message) |
| static gboolean | _drawlayer_modal_wait_tick (gpointer user_data) |
| void | dt_drawlayer_wait_for_rasterization_modal (const dt_iop_drawlayer_gui_data_t *g, const char *title, const char *message) |
| static void | _show_drawlayer_modal_message (const GtkMessageType type, const char *primary, const char *secondary) |
| static gboolean | _color_picker_set_from_position (dt_iop_module_t *self, const float x, const float y) |
| static gboolean | _color_picker_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data) |
| static gboolean | _color_swatch_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data) |
| static gboolean | _color_swatch_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static void | _sync_brush_profile_preview_widget (dt_iop_module_t *self) |
| static gboolean | _brush_profile_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data) |
| static gboolean | _brush_profile_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | _working_rgb_to_display_rgb (dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const float working_rgb[3], float display_rgb[3]) |
| void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_iop_t *piece) |
| Apply selected picker color to drawlayer brush color. | |
| static gboolean | _color_picker_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | _color_picker_button_release (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | _color_picker_motion (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
| static void | _sanitize_params (dt_iop_module_t *self, dt_iop_drawlayer_params_t *params) |
| static void | _sanitize_requested_layer_name (dt_iop_module_t *self, const char *requested, char *name, const size_t name_size) |
| static void | _layerio_append_error (GString *errors, const char *message) |
| static void | _layerio_log_errors (GString *errors) |
| static void | _populate_layer_list (dt_iop_module_t *self) |
| static void | _reset_stroke_session (dt_iop_drawlayer_gui_data_t *g) |
| static void | _invalidate_process_patch (dt_iop_drawlayer_gui_data_t *g) |
| static gboolean | _layer_cache_matches (const dt_iop_drawlayer_gui_data_t *g, const drawlayer_layer_cache_key_t *key) |
| gboolean | dt_drawlayer_ensure_layer_cache (dt_iop_module_t *self) |
| static gboolean | _ensure_widget_cache (dt_iop_module_t *self) |
| static gboolean | _update_runtime_state (const drawlayer_runtime_request_t *request, dt_drawlayer_runtime_source_t *source) |
| static drawlayer_preview_background_t | _resolve_preview_background (const dt_iop_module_t *self, const dt_iop_drawlayer_gui_data_t *gui) |
| void | dt_drawlayer_touch_stroke_commit_hash (dt_iop_drawlayer_params_t *params, const int dab_count, const gboolean have_last_dab, const float last_dab_x, const float last_dab_y, const uint32_t publish_serial) |
| static void | _refresh_layer_widgets (dt_iop_module_t *self) |
| static void | _sync_preview_bg_buttons (dt_iop_module_t *self) |
| static void | _develop_ui_pipe_finished_callback (gpointer instance, gpointer user_data) |
| static gboolean | _delete_current_layer (dt_iop_module_t *self) |
| static gboolean | _confirm_delete_layer (dt_iop_module_t *self, const gboolean removing_module) |
| static gboolean | _rename_current_layer_from_gui (dt_iop_module_t *self, const char *requested_name) |
| static gboolean | _create_new_layer (dt_iop_module_t *self, const char *requested_name) |
| static void | _build_pre_module_filter_string (dt_iop_module_t *self, char *filter, const size_t filter_size) |
| static gboolean | _create_background_layer_from_input (dt_iop_module_t *self) |
| static gboolean | _current_layer_missing_in_sidecar (dt_iop_module_t *self) |
| static void | _widget_changed (GtkWidget *widget, gpointer user_data) |
| static void | _layer_selected (GtkWidget *widget, gpointer user_data) |
| static void | _delete_layer_clicked (GtkButton *button, gpointer user_data) |
| static gboolean | _fill_current_layer (dt_iop_module_t *self, const float value) |
| static gboolean | _clear_current_layer (dt_iop_module_t *self) |
| static void | _fill_white_clicked (GtkButton *button, gpointer user_data) |
| static void | _fill_black_clicked (GtkButton *button, gpointer user_data) |
| static void | _fill_transparent_clicked (GtkButton *button, gpointer user_data) |
| static void | _save_layer_clicked (GtkButton *button, gpointer user_data) |
| static void | _create_layer_clicked (GtkButton *button, gpointer user_data) |
| static void | _create_background_clicked (GtkButton *button, gpointer user_data) |
| static void | _preview_bg_toggled (GtkToggleButton *button, gpointer user_data) |
| static gboolean | _build_raw_input_event (dt_iop_module_t *self, const double wx, const double wy, const double pressure, const dt_drawlayer_paint_stroke_pos_t stroke_pos, dt_drawlayer_paint_raw_input_t *input) |
| 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, const dt_drawlayer_runtime_feedback_t feedback) |
| const char * | name () |
| Module display name. | |
| const char ** | description (struct dt_iop_module_t *self) |
| Module description strings used by UI/help. | |
| int | default_group () |
| Return default iop group for drawlayer module. | |
| int | flags () |
| Return module capability flags. | |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| Return default colorspace expected by drawlayer process paths. | |
| void | init (dt_iop_module_t *module) |
| Allocate and initialize module parameter blocks. | |
| void | init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| Cleanup per-pipe runtime data. | |
| void | commit_params (dt_iop_module_t *self, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| Commit params to runtime piece and refresh base cache state. | |
| void | gui_reset (dt_iop_module_t *self) |
| Reset GUI/session state for current drawlayer instance. | |
| gboolean | module_will_remove (dt_iop_module_t *self) |
| Hook called before module removal from history stack. | |
| void | gui_init (dt_iop_module_t *self) |
| Build GUI widgets and initialize worker/caches. | |
| void | gui_update (dt_iop_module_t *self) |
| Refresh GUI controls from current params and configuration. | |
| void | change_image (dt_iop_module_t *self) |
| Invalidate module state when active image changes. | |
| void | gui_focus (dt_iop_module_t *self, gboolean in) |
| Focus transition hook (enter/leave) for drawlayer GUI mode. | |
| void | gui_cleanup (dt_iop_module_t *self) |
| Destroy GUI resources and stop background worker. | |
| static void | _compute_hud_brush_state (const dt_control_pointer_input_t *pointer_input, drawlayer_hud_brush_state_t *state) |
| static void | _draw_brush_hud (cairo_t *cr, const drawlayer_hud_brush_state_t *state) |
| void | gui_post_expose (dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery) |
| Draw post-expose overlay (cursor, HUD, temp preview). | |
| int | mouse_leave (dt_iop_module_t *self) |
| Mouse leave handler. | |
| int | mouse_moved (dt_iop_module_t *self, double x, double y, double pressure, int which) |
| Mouse motion handler. | |
| int | button_pressed (dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state) |
| Button press handler (starts stroke capture on left button). | |
| int | button_released (dt_iop_module_t *self, double x, double y, int which, uint32_t state) |
| Button release handler (ends current stroke). | |
| int | scrolled (dt_iop_module_t *self, double x, double y, int up, uint32_t state) |
| Scroll handler used for interactive brush-size changes. | |
| int | process (dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
| CPU processing path for layer-over-input compositing. | |
Variables | |
| static GPrivate | _drawlayer_process_scratch_key = G_PRIVATE_INIT(_destroy_process_scratch) |
Drawlayer module entrypoints and runtime orchestration.
| #define _build_process_patch_from_base dt_drawlayer_build_process_patch_from_base |
| #define _commit_dabs dt_drawlayer_commit_dabs |
| #define _current_live_padding dt_drawlayer_current_live_padding |
| #define _drawlayer_runtime_collect_inputs NULL |
| #define _drawlayer_runtime_perform_action NULL |
| #define _drawlayer_wait_for_rasterization_modal dt_drawlayer_wait_for_rasterization_modal |
| #define _ensure_layer_cache dt_drawlayer_ensure_layer_cache |
| #define _flush_layer_cache dt_drawlayer_flush_layer_cache |
| #define _flush_process_patch_to_base dt_drawlayer_flush_process_patch_to_base |
| #define _layer_to_widget_coords dt_drawlayer_layer_to_widget_coords |
| #define _prime_live_process_patch_before_stroke dt_drawlayer_prime_live_process_patch_before_stroke |
| #define _release_all_base_patch_extra_refs dt_drawlayer_release_all_base_patch_extra_refs |
| #define _set_drawlayer_os_cursor_hidden dt_drawlayer_set_os_cursor_hidden |
| #define _set_drawlayer_pipeline_realtime_mode dt_drawlayer_set_pipeline_realtime_mode |
| #define _sync_widget_cache dt_drawlayer_sync_widget_cache |
| #define _touch_stroke_commit_hash dt_drawlayer_touch_stroke_commit_hash |
| #define DRAWLAYER_COMPARE_ANALYTIC_TIMINGS 1 |
| #define DRAWLAYER_WORKER_RING_CAPACITY 65536 |
| typedef struct drawlayer_dir_info_t drawlayer_dir_info_t |
| typedef struct drawlayer_hud_brush_state_t drawlayer_hud_brush_state_t |
| typedef enum drawlayer_input_map_flag_t drawlayer_input_map_flag_t |
| typedef struct drawlayer_layer_cache_key_t drawlayer_layer_cache_key_t |
| typedef enum drawlayer_mapping_profile_t drawlayer_mapping_profile_t |
| typedef struct drawlayer_modal_wait_state_t drawlayer_modal_wait_state_t |
| typedef enum drawlayer_pick_source_t drawlayer_pick_source_t |
| typedef struct drawlayer_preview_background_t drawlayer_preview_background_t |
| typedef enum drawlayer_preview_bg_mode_t drawlayer_preview_bg_mode_t |
| typedef struct drawlayer_process_scratch_t drawlayer_process_scratch_t |
| typedef struct drawlayer_wait_dialog_t drawlayer_wait_dialog_t |
| typedef struct dt_iop_drawlayer_data_t dt_iop_drawlayer_data_t |
|
static |
References _refresh_layer_widgets(), darktable, darktable_t::develop, dt_control_log(), dt_free, FALSE, g, dt_image_t::id, dt_develop_t::image_storage, dt_drawlayer_io_background_job_result_t::imgid, dt_drawlayer_io_background_job_result_t::initiator_layer_name, dt_drawlayer_io_background_job_result_t::initiator_layer_order, dt_develop_t::iop, dt_drawlayer_io_background_job_result_t::message, dt_drawlayer_io_background_job_result_t::sidecar_timestamp, dt_drawlayer_io_background_job_result_t::success, and TRUE.
Referenced by _create_background_layer_from_input().
|
static |
References _clamp01(), dt_load_simd_aligned(), and dt_store_simd_aligned().
Referenced by process().
|
static |
References _sync_brush_profile_preview_widget(), _sync_mode_sensitive_widgets(), _sync_params_from_gui(), _update_gui_runtime_manager(), DT_DRAWLAYER_BRUSH_SHAPE_LINEAR, DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, dt_drawlayer_widgets_pick_brush_profile(), FALSE, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References darktable, dt_drawlayer_widgets_draw_brush_profiles(), FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, and dt_gui_gtk_t::ppd.
Referenced by gui_init().
|
static |
|
static |
References _clamp01(), _fill_input_brush_settings(), _fill_input_layer_coords(), dt_control_pointer_input_t::acceleration, dt_control_get_pointer_input(), FALSE, g, dt_iop_module_t::gui_data, dt_control_pointer_input_t::has_pressure, dt_control_pointer_input_t::pressure, dt_control_pointer_input_t::tilt, TRUE, dt_drawlayer_paint_raw_input_t::wx, dt_control_pointer_input_t::x, and dt_control_pointer_input_t::y.
Referenced by mouse_moved().
|
inlinestatic |
References value.
Referenced by _apply_display_brush_color(), _blend_layer_over_input(), _build_raw_input_event(), _compute_hud_brush_state(), _conf_display_color(), _conf_softness(), _fill_current_layer(), _get_brush_colors(), _load_color_history(), _mapping_profile_value(), _process_backend_dab(), _rasterize_pending_dab_batch(), _working_rgb_to_display_rgb(), button_pressed(), button_released(), dt_drawlayer_build_worker_input_dab(), and dt_drawlayer_worker_replay_finished_stroke_to_base_patch().
|
static |
References _commit_dabs, _invalidate_process_patch(), _reset_stroke_session(), _touch_stroke_commit_hash, _update_gui_runtime_manager(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_drawlayer_cache_clear_transparent_float(), dt_drawlayer_cache_patch_wrlock(), dt_drawlayer_cache_patch_wrunlock(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, FALSE, g, dt_iop_module_t::gui_data, dt_iop_module_t::params, and TRUE.
Referenced by _fill_transparent_clicked().
|
static |
References _color_picker_set_from_position(), FALSE, and void().
Referenced by gui_init().
|
static |
References _remember_display_color(), dt_drawlayer_widgets_finish_picker_drag(), FALSE, g, dt_iop_module_t::gui_data, and void().
Referenced by gui_init().
|
static |
References darktable, dt_drawlayer_widgets_draw_picker(), FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, and dt_gui_gtk_t::ppd.
Referenced by gui_init().
|
static |
References _color_picker_set_from_position(), dt_drawlayer_widgets_is_picker_dragging(), FALSE, g, dt_iop_module_t::gui_data, and void().
Referenced by gui_init().
|
static |
References _apply_display_brush_color(), dt_drawlayer_widgets_update_from_picker_position(), FALSE, g, dt_iop_module_t::gui_data, TRUE, and x.
Referenced by _color_picker_button_press(), and _color_picker_motion().
|
static |
References _apply_display_brush_color(), dt_drawlayer_widgets_pick_history_color(), FALSE, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References dt_drawlayer_widgets_draw_swatch(), FALSE, g, and dt_iop_module_t::gui_data.
Referenced by gui_init().
|
static |
References _clamp01(), _conf_flow(), _conf_hardness(), _conf_mapping_profile(), _conf_opacity(), _conf_size(), _mapping_profile_value(), dt_control_pointer_input_t::acceleration, drawlayer_hud_brush_state_t::acceleration, 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_conf_get_bool(), drawlayer_hud_brush_state_t::flow, drawlayer_hud_brush_state_t::hardness, dt_control_pointer_input_t::has_pressure, dt_control_pointer_input_t::has_tilt, drawlayer_hud_brush_state_t::opacity, dt_control_pointer_input_t::pressure, drawlayer_hud_brush_state_t::pressure, drawlayer_hud_brush_state_t::radius, dt_control_pointer_input_t::tilt, and drawlayer_hud_brush_state_t::tilt.
Referenced by gui_post_expose().
|
static |
References _delete_current_layer(), _ensure_layer_name(), darktable, dt_iop_module_t::dev, dt_ui_main_window(), FALSE, darktable_t::gui, dt_iop_module_t::params, TRUE, and dt_gui_gtk_t::ui.
Referenced by _delete_layer_clicked(), gui_reset(), and module_will_remove().
|
static |
References _create_background_layer_from_input(), dt_control_log(), and void().
Referenced by gui_init().
|
static |
References _background_layer_job_done_idle(), _build_pre_module_filter_string(), _commit_dabs, _ensure_layer_cache, _ensure_layer_name(), _flush_layer_cache, _layer_name_non_empty(), dt_dev_pixelpipe_iop_t::buf_in, darktable_t::control, drawlayer_dir_info_t::count, dt_drawlayer_io_layer_info_t::count, darktable, dt_iop_module_t::dev, dt_drawlayer_io_background_job_params_t::done_idle, dt_drawlayer_io_background_job_params_t::dst_x, dt_drawlayer_io_background_job_params_t::dst_y, dt_control_add_job(), dt_control_job_add_progress(), dt_control_job_create(), dt_control_job_set_params(), dt_dev_distort_get_iop_pipe(), dt_drawlayer_io_background_layer_job_run(), dt_drawlayer_io_find_layer(), dt_drawlayer_io_sidecar_path(), dt_free, DT_JOB_QUEUE_USER_BG, FALSE, dt_drawlayer_io_background_job_params_t::filter, drawlayer_dir_info_t::found, dt_drawlayer_io_layer_info_t::found, g, dt_iop_module_t::gui_data, drawlayer_dir_info_t::height, dt_drawlayer_io_layer_info_t::height, dt_image_t::id, dt_develop_t::image_storage, dt_drawlayer_io_background_job_params_t::imgid, drawlayer_dir_info_t::index, dt_drawlayer_io_layer_info_t::index, dt_drawlayer_io_background_job_params_t::initiator_layer_name, dt_drawlayer_io_background_job_params_t::initiator_layer_order, dt_drawlayer_io_background_job_params_t::insert_after_order, 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_drawlayer_io_background_job_params_t::raw_height, dt_develop_t::raw_width, dt_drawlayer_io_background_job_params_t::raw_width, dt_drawlayer_io_background_job_params_t::requested_bg_name, dt_develop_t::roi, dt_drawlayer_io_background_job_params_t::sidecar_path, TRUE, drawlayer_dir_info_t::width, dt_drawlayer_io_layer_info_t::width, dt_drawlayer_io_layer_info_t::work_profile, dt_drawlayer_io_background_job_params_t::work_profile, drawlayer_dir_info_t::work_profile, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _create_background_clicked().
|
static |
References _create_new_layer(), dt_control_log(), g, dt_iop_module_t::gui_data, and void().
Referenced by gui_init().
|
static |
References _commit_dabs, _flush_layer_cache, _refresh_layer_widgets(), _sanitize_requested_layer_name(), _touch_stroke_commit_hash, _update_gui_runtime_manager(), dt_iop_module_t::dev, DRAWLAYER_NAME_SIZE, dt_dev_add_history_item, dt_dev_pixelpipe_update_history_all, DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, FALSE, g, dt_iop_module_t::gui_data, gui_update(), dt_iop_module_t::params, and TRUE.
Referenced by _create_layer_clicked(), and gui_focus().
|
static |
References dt_iop_module_t::dev, dt_drawlayer_io_find_layer(), dt_drawlayer_io_sidecar_path(), FALSE, dt_image_t::id, dt_develop_t::image_storage, dt_iop_module_t::params, and PATH_MAX.
Referenced by gui_focus().
|
static |
References MAX, dt_iop_module_t::multi_name, dt_iop_module_t::multi_priority, and name().
Referenced by _delete_current_layer(), _ensure_layer_name(), _sanitize_requested_layer_name(), dt_drawlayer_ensure_layer_cache(), and gui_reset().
|
static |
References _default_layer_name(), _ensure_layer_name(), _layerio_append_error(), _layerio_log_errors(), _refresh_layer_widgets(), _release_all_base_patch_extra_refs, _reset_stroke_session(), drawlayer_dir_info_t::count, dt_drawlayer_io_layer_info_t::count, dt_iop_module_t::dev, dt_drawlayer_cache_patch_clear(), dt_drawlayer_io_find_layer(), 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, drawlayer_dir_info_t::height, dt_drawlayer_io_layer_info_t::height, dt_image_t::id, dt_develop_t::image_storage, drawlayer_dir_info_t::index, dt_drawlayer_io_layer_info_t::index, dt_drawlayer_io_layer_info_t::name, drawlayer_dir_info_t::name, dt_iop_module_t::params, PATH_MAX, 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, and drawlayer_dir_info_t::work_profile.
Referenced by _confirm_delete_layer().
|
static |
|
static |
|
static |
References _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, dt_iop_module_t::dev, dt_drawlayer_runtime_manager_update(), g, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, dt_drawlayer_runtime_host_t::user_data, and void().
Referenced by gui_cleanup(), and gui_init().
|
static |
References drawlayer_hud_brush_state_t::acceleration, DT_PIXEL_APPLY_DPI, drawlayer_hud_brush_state_t::flow, drawlayer_hud_brush_state_t::hardness, i, drawlayer_hud_brush_state_t::opacity, drawlayer_hud_brush_state_t::pressure, drawlayer_hud_brush_state_t::radius, drawlayer_hud_brush_state_t::tilt, and x.
Referenced by gui_post_expose().
|
static |
|
static |
References dt_hash().
Referenced by _refresh_piece_base_cache(), _rekey_shared_base_patch(), and dt_drawlayer_ensure_layer_cache().
|
static |
|
static |
References _default_layer_name().
Referenced by _confirm_delete_layer(), _create_background_layer_from_input(), _delete_current_layer(), _populate_layer_list(), _sanitize_params(), gui_init(), and gui_update().
|
static |
References dt_iop_module_t::dev, dt_drawlayer_compute_view_patch(), dt_drawlayer_layer_bounds_to_widget_bounds(), dt_drawlayer_worker_reset_backend_path(), FALSE, g, dt_iop_module_t::gui_data, dt_develop_t::roi, dt_develop_t::scaling, TRUE, dt_drawlayer_damaged_rect_t::valid, view(), dt_develop_t::x, and dt_develop_t::y.
Referenced by dt_drawlayer_sync_widget_cache().
|
static |
References _fill_current_layer(), dt_control_log(), and void().
Referenced by gui_init().
|
static |
References _clamp01(), _commit_dabs, _invalidate_process_patch(), _reset_stroke_session(), _touch_stroke_commit_hash, _update_gui_runtime_manager(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_drawlayer_cache_patch_wrlock(), dt_drawlayer_cache_patch_wrunlock(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, FALSE, g, dt_iop_module_t::gui_data, dt_iop_module_t::params, TRUE, and value.
Referenced by _fill_black_clicked(), and _fill_white_clicked().
|
static |
References _conf_brush_mode(), _conf_brush_shape(), _conf_distance(), _conf_flow(), _conf_hardness(), _conf_mapping_profile(), _conf_opacity(), _conf_size(), _conf_smoothing(), _conf_sprinkle_coarseness(), _conf_sprinkle_size(), _conf_sprinkles(), _get_brush_colors(), dt_drawlayer_paint_raw_input_t::accel_profile, 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, dt_drawlayer_paint_raw_input_t::distance_percent, 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, 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, dt_conf_get_bool(), dt_drawlayer_paint_raw_input_t::map_flags, dt_drawlayer_paint_raw_input_t::pressure_profile, dt_drawlayer_paint_raw_input_t::smoothing_percent, and dt_drawlayer_paint_raw_input_t::tilt_profile.
Referenced by _build_raw_input_event(), button_pressed(), and button_released().
|
static |
References dt_drawlayer_widget_to_layer_coords(), FALSE, dt_drawlayer_paint_raw_input_t::have_layer_coords, dt_drawlayer_paint_raw_input_t::lx, dt_drawlayer_paint_raw_input_t::ly, TRUE, dt_drawlayer_paint_raw_input_t::wx, and dt_drawlayer_paint_raw_input_t::wy.
Referenced by _build_raw_input_event(), button_pressed(), and button_released().
|
static |
References _clear_current_layer(), dt_control_log(), and void().
Referenced by gui_init().
|
static |
References _fill_current_layer(), dt_control_log(), and void().
Referenced by gui_init().
|
static |
References _get_process_scratch(), _rekey_shared_base_patch(), dt_iop_module_t::dev, dt_drawlayer_cache_flush_process_patch_to_base(), drawlayer_process_scratch_t::flush_update_rgba, drawlayer_process_scratch_t::flush_update_rgba_pixels, g, dt_image_t::id, dt_develop_t::image_storage, and dt_iop_module_t::params.
Referenced by dt_drawlayer_flush_process_patch_to_base().
|
static |
References _clamp01(), _conf_display_color(), _conf_hdr_exposure(), dt_iop_module_t::dev, dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_pipe_output_profile_info(), dt_ioppr_transform_image_colorspace_rgb(), dt_develop_t::iop, out, and dt_develop_t::pipe.
Referenced by _fill_input_brush_settings().
|
static |
|
static |
References _drawlayer_process_scratch_key.
Referenced by _flush_process_patch_to_base_locked(), and process().
|
static |
References dt_drawlayer_process_state_invalidate(), and g.
Referenced by _clear_current_layer(), _fill_current_layer(), dt_drawlayer_commit_dabs(), and dt_drawlayer_ensure_layer_cache().
|
static |
|
static |
References FALSE, g, key, and TRUE.
Referenced by _update_runtime_state(), and dt_drawlayer_ensure_layer_cache().
|
static |
References DRAWLAYER_NAME_SIZE, FALSE, and name().
Referenced by _create_background_layer_from_input(), _save_layer_clicked(), and dt_drawlayer_flush_layer_cache().
References _refresh_layer_widgets(), _touch_stroke_commit_hash, _update_gui_runtime_manager(), darktable, dt_iop_module_t::dev, DRAWLAYER_NAME_SIZE, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), dt_dev_add_history_item, dt_dev_pixelpipe_update_history_all, DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, gui_update(), dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
Referenced by _delete_current_layer(), _rename_current_layer_from_gui(), and dt_drawlayer_ensure_layer_cache().
|
static |
References dt_control_log().
Referenced by _delete_current_layer(), _rename_current_layer_from_gui(), and dt_drawlayer_ensure_layer_cache().
|
inlinestatic |
|
static |
References darktable, dt_iop_module_t::dev, dt_ui_main_window(), FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_develop_t::gui_module, and dt_gui_gtk_t::ui.
Referenced by dt_drawlayer_ensure_layer_cache(), and gui_focus().
|
static |
References _ensure_layer_name(), darktable, dt_iop_module_t::dev, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_length(), dt_bauhaus_combobox_remove_at(), dt_bauhaus_combobox_set(), dt_drawlayer_io_free_layer_names(), dt_drawlayer_io_list_layer_names(), dt_drawlayer_io_sidecar_path(), g, darktable_t::gui, dt_iop_module_t::gui_data, i, dt_image_t::id, dt_develop_t::image_storage, dt_iop_module_t::params, PATH_MAX, and dt_gui_gtk_t::reset.
Referenced by _refresh_layer_widgets(), dt_drawlayer_ensure_layer_cache(), and gui_update().
|
static |
References _sync_preview_bg_buttons(), _touch_stroke_commit_hash, darktable, dt_iop_module_t::dev, DRAWLAYER_PREVIEW_BG_BLACK, DRAWLAYER_PREVIEW_BG_GREY, DRAWLAYER_PREVIEW_BG_IMAGE, DRAWLAYER_PREVIEW_BG_WHITE, dt_dev_add_history_item, dt_dev_pixelpipe_update_history_all, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References c, FALSE, and value.
Referenced by _sanitize_params().
|
static |
|
static |
References _drawlayer_params_cache_hash(), dt_drawlayer_process_state_t::base_patch, dt_drawlayer_process_state_t::cache_dirty, dt_drawlayer_cache_patch_t::cache_entry, dt_drawlayer_cache_patch_t::cache_hash, dt_drawlayer_process_state_t::cache_imgid, dt_drawlayer_process_state_t::cache_layer_name, dt_drawlayer_process_state_t::cache_layer_order, dt_drawlayer_process_state_t::cache_valid, drawlayer_dir_info_t::count, dt_drawlayer_io_layer_info_t::count, dt_drawlayer_cache_clear_transparent_float(), dt_drawlayer_cache_patch_alloc_shared(), dt_drawlayer_cache_patch_clear(), dt_drawlayer_cache_patch_wrlock(), dt_drawlayer_cache_patch_wrunlock(), dt_drawlayer_io_find_layer(), dt_drawlayer_io_load_layer(), dt_drawlayer_io_sidecar_path(), dt_drawlayer_process_state_invalidate(), FALSE, drawlayer_dir_info_t::found, dt_drawlayer_io_layer_info_t::found, drawlayer_dir_info_t::height, dt_drawlayer_cache_patch_t::height, dt_drawlayer_io_patch_t::height, dt_drawlayer_io_layer_info_t::height, dt_iop_module_t::id, drawlayer_dir_info_t::index, dt_drawlayer_io_layer_info_t::index, dt_drawlayer_io_layer_info_t::name, drawlayer_dir_info_t::name, PATH_MAX, dt_dev_pixelpipe_iop_t::pipe, dt_drawlayer_cache_patch_t::pixels, dt_drawlayer_io_patch_t::pixels, dt_iop_drawlayer_data_t::process, TRUE, drawlayer_dir_info_t::width, dt_drawlayer_cache_patch_t::width, dt_drawlayer_io_patch_t::width, dt_drawlayer_io_layer_info_t::width, dt_drawlayer_io_layer_info_t::work_profile, drawlayer_dir_info_t::work_profile, dt_drawlayer_cache_patch_t::x, dt_drawlayer_io_patch_t::x, dt_drawlayer_cache_patch_t::y, and dt_drawlayer_io_patch_t::y.
Referenced by commit_params().
|
static |
References _drawlayer_params_cache_hash(), dt_drawlayer_cache_patch_t::cache_entry, dt_drawlayer_cache_patch_t::cache_hash, darktable, DT_DEBUG_PERF, DT_DEBUG_VERBOSE, dt_dev_pixelpipe_cache_flush_host_pinned_image(), dt_dev_pixelpipe_cache_rekey(), dt_drawlayer_cache_patch_alloc_shared(), dt_drawlayer_cache_patch_clear(), dt_drawlayer_cache_patch_rdlock(), dt_drawlayer_cache_patch_rdunlock(), dt_print(), FALSE, dt_drawlayer_cache_patch_t::height, darktable_t::pixelpipe_cache, dt_drawlayer_cache_patch_t::pixels, TRUE, darktable_t::unmuted, and dt_drawlayer_cache_patch_t::width.
Referenced by _flush_process_patch_to_base_locked(), _save_layer_clicked(), dt_drawlayer_build_process_patch_from_base(), and dt_drawlayer_flush_layer_cache().
|
static |
References _commit_dabs, _flush_layer_cache, _layerio_append_error(), _layerio_log_errors(), _refresh_layer_widgets(), _sanitize_requested_layer_name(), _sidecar_timestamp_from_path(), drawlayer_dir_info_t::count, dt_drawlayer_io_layer_info_t::count, dt_iop_module_t::dev, DRAWLAYER_NAME_SIZE, dt_dev_add_history_item, dt_drawlayer_io_find_layer(), dt_drawlayer_io_layer_name_exists(), 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, drawlayer_dir_info_t::height, dt_drawlayer_io_layer_info_t::height, dt_image_t::id, dt_develop_t::image_storage, drawlayer_dir_info_t::index, dt_drawlayer_io_layer_info_t::index, dt_drawlayer_io_layer_info_t::name, drawlayer_dir_info_t::name, dt_iop_module_t::params, PATH_MAX, 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, and drawlayer_dir_info_t::work_profile.
Referenced by _widget_changed().
|
static |
|
static |
|
static |
References darktable, dt_dev_pixelpipe_cache_ref_count_entry(), g, darktable_t::pixelpipe_cache, and TRUE.
Referenced by dt_drawlayer_ensure_layer_cache().
|
static |
References darktable, dt_dev_pixelpipe_cache_ref_count_entry(), g, darktable_t::pixelpipe_cache, and TRUE.
Referenced by dt_drawlayer_commit_dabs().
|
static |
|
static |
References _default_layer_name(), and name().
Referenced by _create_new_layer(), and _rename_current_layer_from_gui().
|
static |
References _commit_dabs, _drawlayer_wait_for_rasterization_modal, _flush_layer_cache, _flush_process_patch_to_base, _layer_name_non_empty(), _refresh_layer_widgets(), _rekey_shared_base_patch(), _release_all_base_patch_extra_refs, _show_drawlayer_modal_message(), darktable, dt_iop_module_t::dev, dt_ui_main_window(), FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_image_t::id, dt_develop_t::image_storage, dt_iop_module_t::params, dt_gui_gtk_t::ui, and void().
Referenced by gui_init().
|
static |
References darktable, dt_ui_main_window(), darktable_t::gui, type, and dt_gui_gtk_t::ui.
Referenced by _save_layer_clicked().
|
static |
References darktable, drawlayer_wait_dialog_t::dialog, DT_PIXEL_APPLY_DPI, dt_ui_main_window(), FALSE, darktable_t::gui, main(), TRUE, and dt_gui_gtk_t::ui.
Referenced by dt_drawlayer_wait_for_rasterization_modal().
|
static |
|
static |
References _conf_brush_shape(), _conf_hardness(), _conf_opacity(), _conf_sprinkle_coarseness(), _conf_sprinkle_size(), _conf_sprinkles(), dt_drawlayer_widgets_set_brush_profile_preview(), g, and dt_iop_module_t::gui_data.
Referenced by _brush_profile_button_press(), _widget_changed(), and gui_update().
|
static |
References _conf_brush_mode(), _conf_brush_shape(), DT_DRAWLAYER_BRUSH_MODE_PAINT, DT_DRAWLAYER_BRUSH_SHAPE_GAUSSIAN, g, and dt_iop_module_t::gui_data.
Referenced by _brush_profile_button_press(), _widget_changed(), and gui_update().
|
static |
References DRAWLAYER_PREVIEW_BG_BLACK, DRAWLAYER_PREVIEW_BG_GREY, DRAWLAYER_PREVIEW_BG_IMAGE, DRAWLAYER_PREVIEW_BG_WHITE, g, and dt_iop_module_t::gui_data.
Referenced by _preview_bg_toggled(), and gui_update().
|
static |
References _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, dt_drawlayer_runtime_manager_update(), g, dt_drawlayer_runtime_result_t::ok, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, TRUE, and dt_drawlayer_runtime_host_t::user_data.
Referenced by _brush_profile_button_press(), _clear_current_layer(), _create_new_layer(), _fill_current_layer(), _layer_selected(), _widget_changed(), and gui_cleanup().
|
static |
References _layer_cache_matches(), dt_drawlayer_runtime_source_t::cache_entry, dt_drawlayer_runtime_source_t::direct_copy, dt_drawlayer_runtime_request_t::display_pipe, dt_drawlayer_cache_build_combined_process_roi_for_piece(), dt_drawlayer_cache_patch_rdlock(), DT_DRAWLAYER_RUNTIME_ACTOR_PIPELINE_CL, DT_DRAWLAYER_RUNTIME_ACTOR_PIPELINE_CPU, DT_DRAWLAYER_RUNTIME_BUFFER_BASE_PATCH, DT_DRAWLAYER_RUNTIME_BUFFER_PROCESS_SNAPSHOT, dt_drawlayer_runtime_manager_note_buffer_lock(), DT_DRAWLAYER_SOURCE_GUI_PROCESS, DT_DRAWLAYER_SOURCE_HEADLESS_BASE, FALSE, dt_drawlayer_runtime_request_t::gui, dt_drawlayer_runtime_source_t::height, dt_iop_module_t::id, drawlayer_layer_cache_key_t::imgid, dt_drawlayer_runtime_source_t::kind, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, dt_drawlayer_runtime_request_t::manager, dt_drawlayer_process_view_t::patch, dt_drawlayer_runtime_request_t::piece, dt_dev_pixelpipe_iop_t::pipe, dt_drawlayer_runtime_source_t::pixels, process(), dt_drawlayer_runtime_request_t::process_state, dt_drawlayer_runtime_source_t::process_view, dt_drawlayer_runtime_request_t::roi_in, dt_drawlayer_runtime_request_t::roi_out, dt_drawlayer_runtime_request_t::runtime_params, dt_drawlayer_runtime_request_t::self, dt_drawlayer_runtime_source_t::source_roi, dt_drawlayer_runtime_source_t::target_roi, dt_drawlayer_runtime_source_t::tracked_actor, dt_drawlayer_runtime_source_t::tracked_buffer, dt_drawlayer_runtime_source_t::tracked_read_lock, TRUE, dt_drawlayer_runtime_request_t::use_opencl, dt_drawlayer_runtime_source_t::width, and dt_iop_roi_t::x.
Referenced by process().
References _rename_current_layer_from_gui(), _sync_brush_profile_preview_widget(), _sync_mode_sensitive_widgets(), _sync_params_from_gui(), _update_gui_runtime_manager(), darktable, DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
| int button_pressed | ( | dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
Button press handler (starts stroke capture on left button).
References _clamp01(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _fill_input_brush_settings(), _fill_input_layer_coords(), dt_control_pointer_input_t::acceleration, dt_iop_module_t::dev, dt_control_get_pointer_input(), dt_control_log(), dt_control_queue_redraw_center(), DT_DRAWLAYER_PAINT_STROKE_FIRST, DT_DRAWLAYER_RUNTIME_EVENT_GUI_RAW_INPUT, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_STROKE_BEGIN, dt_iop_request_focus(), dt_drawlayer_runtime_update_request_t::event, g, dt_iop_module_t::gui_data, dt_develop_t::gui_module, dt_control_pointer_input_t::has_pressure, dt_drawlayer_runtime_result_t::ok, dt_iop_module_t::params, dt_control_pointer_input_t::pressure, dt_drawlayer_runtime_result_t::raw_input_ok, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, dt_control_pointer_input_t::tilt, update(), dt_drawlayer_runtime_host_t::user_data, dt_drawlayer_paint_raw_input_t::wx, x, dt_control_pointer_input_t::x, and dt_control_pointer_input_t::y.
| int button_released | ( | dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | which, | ||
| uint32_t | state | ||
| ) |
Button release handler (ends current stroke).
References _clamp01(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _fill_input_brush_settings(), _fill_input_layer_coords(), dt_control_pointer_input_t::acceleration, dt_iop_module_t::dev, dt_control_get_pointer_input(), dt_control_log(), dt_control_queue_redraw_center(), DT_DRAWLAYER_PAINT_STROKE_END, DT_DRAWLAYER_RUNTIME_EVENT_GUI_RAW_INPUT, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_STROKE_END, dt_drawlayer_runtime_update_request_t::event, g, dt_iop_module_t::gui_data, dt_control_pointer_input_t::has_pressure, dt_drawlayer_runtime_result_t::ok, dt_iop_module_t::params, dt_control_pointer_input_t::pressure, dt_drawlayer_runtime_result_t::raw_input_ok, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, dt_control_pointer_input_t::tilt, update(), dt_drawlayer_runtime_host_t::user_data, dt_drawlayer_paint_raw_input_t::wx, x, dt_control_pointer_input_t::x, and dt_control_pointer_input_t::y.
| void change_image | ( | dt_iop_module_t * | self | ) |
Invalidate module state when active image changes.
References _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, DT_DRAWLAYER_RUNTIME_EVENT_GUI_CHANGE_IMAGE, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, dt_drawlayer_runtime_update_request_t::event, g, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, update(), and dt_drawlayer_runtime_host_t::user_data.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Cleanup per-pipe runtime data.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_drawlayer_process_state_cleanup(), dt_drawlayer_runtime_manager_cleanup(), dt_free, dt_iop_drawlayer_data_t::headless_manager, dt_iop_drawlayer_data_t::process, and void().
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Apply selected picker color to drawlayer brush color.
References _apply_display_brush_color(), _conf_pick_source(), _working_rgb_to_display_rgb(), darktable, DRAWLAYER_PICK_SOURCE_OUTPUT, darktable_t::gui, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, dt_iop_module_t::picked_output_color, dt_iop_module_t::picked_output_color_max, dt_iop_module_t::picked_output_color_min, dt_gui_gtk_t::reset, TRUE, and void().
| void commit_params | ( | dt_iop_module_t * | self, |
| dt_iop_params_t * | params, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Commit params to runtime piece and refresh base cache state.
References _refresh_piece_base_cache(), _sanitize_params(), dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_drawlayer_runtime_manager_bind_piece(), g, dt_iop_module_t::gui_data, dt_iop_drawlayer_data_t::headless_manager, dt_iop_drawlayer_data_t::params, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_iop_drawlayer_data_t::process, dt_iop_drawlayer_data_t::runtime_display_pipe, dt_iop_drawlayer_data_t::runtime_manager, and dt_iop_drawlayer_data_t::runtime_process.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Return default colorspace expected by drawlayer process paths.
References IOP_CS_RGB.
| int default_group | ( | ) |
Return default iop group for drawlayer module.
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Module description strings used by UI/help.
References dt_iop_set_description().
| void dt_drawlayer_begin_gui_stroke_capture | ( | dt_iop_module_t * | self, |
| const dt_drawlayer_paint_raw_input_t * | first_input | ||
| ) |
References dt_drawlayer_worker_active(), dt_drawlayer_worker_reset_backend_path(), dt_drawlayer_worker_reset_live_publish(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_drawlayer_paint_raw_input_t::event_index, FALSE, g, dt_iop_module_t::gui_data, dt_drawlayer_paint_raw_input_t::stroke_batch, and TRUE.
Referenced by dt_drawlayer_runtime_manager_update().
| 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 | ||
| ) |
References _conf_size(), _flush_process_patch_to_base, _rekey_shared_base_patch(), dt_drawlayer_process_patch_geometry_t::combined_roi, darktable, dt_iop_module_t::dev, DT_DEBUG_PERF, DT_DEBUG_VERBOSE, dt_drawlayer_cache_ensure_process_patch_buffer(), dt_drawlayer_cache_patch_rdlock(), dt_drawlayer_cache_patch_rdunlock(), dt_drawlayer_cache_patch_wrlock(), dt_drawlayer_cache_patch_wrunlock(), dt_drawlayer_cache_populate_process_patch_from_base(), dt_drawlayer_compute_process_patch_geometry(), dt_drawlayer_process_state_publish_locked(), dt_drawlayer_worker_any_active(), dt_drawlayer_worker_pending_dab_count(), dt_print(), FALSE, g, dt_iop_roi_t::height, dt_drawlayer_cache_patch_t::height, dt_image_t::id, dt_develop_t::image_storage, dt_drawlayer_process_patch_geometry_t::padded_roi, dt_iop_module_t::params, dt_drawlayer_process_patch_geometry_t::patch_height, dt_drawlayer_process_patch_geometry_t::patch_width, dt_drawlayer_cache_patch_t::pixels, dt_drawlayer_process_patch_geometry_t::process_pad, dt_iop_roi_t::scale, t, TRUE, darktable_t::unmuted, dt_iop_roi_t::width, dt_drawlayer_cache_patch_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by dt_drawlayer_runtime_manager_update().
| gboolean dt_drawlayer_commit_dabs | ( | dt_iop_module_t * | self, |
| gboolean | record_history | ||
| ) |
References _cancel_async_commit(), _invalidate_process_patch(), _prime_live_process_patch_before_stroke, _reset_stroke_session(), _retain_base_patch_stroke_ref(), _set_drawlayer_pipeline_realtime_mode, _touch_stroke_commit_hash, _wait_worker_idle(), dt_iop_module_t::dev, dt_control_queue_redraw_center(), dt_dev_add_history_item_ext(), dt_dev_history_compute_hash(), dt_dev_history_notify_change(), dt_dev_pixelpipe_update_history_all, dt_dev_set_history_hash(), dt_dev_undo_end_record(), dt_dev_undo_start_record(), dt_dev_write_history(), dt_drawlayer_worker_finished_stroke_queued(), dt_drawlayer_worker_flush_finished_strokes(), dt_drawlayer_worker_publish_backend_stroke_damage(), dt_drawlayer_worker_raw_inputs(), dt_drawlayer_worker_replay_finished_stroke_to_base_patch(), dt_drawlayer_worker_request_commit(), dt_drawlayer_worker_reset_stroke(), dt_drawlayer_worker_seal_for_commit(), dt_drawlayer_worker_stroke(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_pthread_rwlock_unlock, dt_pthread_rwlock_wrlock, FALSE, g, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_develop_t::history_mutex, dt_image_t::id, dt_develop_t::image_storage, dt_iop_module_t::params, and TRUE.
Referenced by _perform_runtime_commit_sequence().
| void dt_drawlayer_end_gui_stroke_capture | ( | dt_iop_module_t * | self | ) |
References g, and dt_iop_module_t::gui_data.
Referenced by dt_drawlayer_runtime_manager_update().
| 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().
| gboolean dt_drawlayer_flush_layer_cache | ( | dt_iop_module_t * | self | ) |
References _flush_process_patch_to_base, _layer_name_non_empty(), _rekey_shared_base_patch(), _release_all_base_patch_extra_refs, _sidecar_timestamp_from_path(), dt_iop_module_t::dev, dt_drawlayer_cache_patch_rdlock(), dt_drawlayer_cache_patch_rdunlock(), dt_drawlayer_io_sidecar_path(), dt_drawlayer_io_store_layer(), dt_drawlayer_worker_any_active(), dt_drawlayer_worker_flush_finished_strokes(), FALSE, g, dt_iop_module_t::gui_data, dt_image_t::id, dt_develop_t::image_storage, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, dt_iop_module_t::params, PATH_MAX, dt_iop_drawlayer_params_t::sidecar_timestamp, TRUE, dt_drawlayer_io_patch_t::width, and dt_drawlayer_io_patch_t::x.
Referenced by dt_drawlayer_runtime_manager_update().
| void dt_drawlayer_flush_process_patch_to_base | ( | dt_iop_module_t * | self, |
| dt_iop_drawlayer_gui_data_t * | g | ||
| ) |
| gboolean dt_drawlayer_prime_live_process_patch_before_stroke | ( | dt_iop_module_t * | self | ) |
References _build_process_patch_from_base, _is_drawlayer_display_pipe(), dt_iop_module_t::dev, dt_dev_distort_get_iop_pipe(), dt_drawlayer_cache_patch_rdlock(), dt_drawlayer_cache_patch_rdunlock(), FALSE, g, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_develop_t::pipe, dt_dev_pixelpipe_iop_t::planned_roi_in, dt_dev_pixelpipe_iop_t::planned_roi_out, dt_develop_t::preview_pipe, and TRUE.
Referenced by dt_drawlayer_runtime_manager_update().
| void dt_drawlayer_release_all_base_patch_extra_refs | ( | dt_iop_drawlayer_gui_data_t * | g | ) |
References darktable, dt_dev_pixelpipe_cache_ref_count_entry(), FALSE, g, and darktable_t::pixelpipe_cache.
Referenced by dt_drawlayer_runtime_manager_update().
| void dt_drawlayer_set_os_cursor_hidden | ( | const gboolean | hidden | ) |
References darktable, dt_control_set_cursor(), dt_ui_center(), dt_ui_main_window(), darktable_t::gui, main(), and dt_gui_gtk_t::ui.
Referenced by dt_drawlayer_runtime_manager_update().
| void dt_drawlayer_set_pipeline_realtime_mode | ( | dt_iop_module_t * | self, |
| gboolean | state | ||
| ) |
References dt_iop_module_t::dev, dt_atomic_set_int(), dt_dev_pixelpipe_get_realtime(), dt_dev_pixelpipe_resync_history_main, dt_dev_pixelpipe_set_realtime(), dt_dev_pixelpipe_t::pause, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::shutdown, and TRUE.
Referenced by _perform_runtime_commit_sequence(), and dt_drawlayer_runtime_manager_update().
| void dt_drawlayer_show_runtime_feedback | ( | const dt_iop_drawlayer_gui_data_t * | g, |
| const dt_drawlayer_runtime_feedback_t | feedback | ||
| ) |
| gboolean dt_drawlayer_sync_widget_cache | ( | dt_iop_module_t * | self | ) |
References _current_live_padding, _ensure_widget_cache(), _pause_worker(), _resume_worker(), dt_iop_module_t::dev, FALSE, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by _perform_runtime_widget_cache_sync().
| void dt_drawlayer_touch_stroke_commit_hash | ( | dt_iop_drawlayer_params_t * | params, |
| const int | dab_count, | ||
| const gboolean | have_last_dab, | ||
| const float | last_dab_x, | ||
| const float | last_dab_y, | ||
| const uint32_t | publish_serial | ||
| ) |
References dt_hash().
Referenced by _publish_backend_progress().
| void dt_drawlayer_wait_for_rasterization_modal | ( | const dt_iop_drawlayer_gui_data_t * | g, |
| const char * | title, | ||
| const char * | message | ||
| ) |
| int flags | ( | ) |
Return module capability flags.
References IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_cleanup | ( | dt_iop_module_t * | self | ) |
Destroy GUI resources and stop background worker.
References _develop_ui_pipe_finished_callback(), _release_all_base_patch_extra_refs, _set_drawlayer_os_cursor_hidden, _update_gui_runtime_manager(), darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_drawlayer_process_state_cleanup(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_FOCUS_LOSS, dt_drawlayer_runtime_manager_cleanup(), dt_drawlayer_ui_cursor_clear(), dt_drawlayer_widgets_cleanup(), dt_drawlayer_worker_cleanup(), FALSE, g, dt_iop_module_t::gui_data, IOP_GUI_FREE, and darktable_t::signals.
| void gui_focus | ( | dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
Focus transition hook (enter/leave) for drawlayer GUI mode.
References _create_new_layer(), _current_layer_missing_in_sidecar(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _offer_missing_layer_recreation(), _set_drawlayer_os_cursor_hidden, _touch_stroke_commit_hash, dt_iop_module_t::dev, dt_control_log(), dt_dev_add_history_item_ext(), dt_dev_history_compute_hash(), dt_dev_history_notify_change(), dt_dev_set_history_hash(), dt_dev_undo_end_record(), dt_dev_undo_start_record(), dt_dev_write_history(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_FOCUS_GAIN, DT_DRAWLAYER_RUNTIME_EVENT_GUI_FOCUS_LOSS, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, dt_pthread_rwlock_unlock, dt_pthread_rwlock_wrlock, dt_drawlayer_runtime_update_request_t::event, FALSE, g, dt_iop_module_t::gui_data, dt_develop_t::history_mutex, dt_image_t::id, dt_develop_t::image_storage, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, TRUE, update(), and dt_drawlayer_runtime_host_t::user_data.
| void gui_init | ( | dt_iop_module_t * | self | ) |
Build GUI widgets and initialize worker/caches.
References _brush_profile_button_press(), _brush_profile_draw(), _color_picker_button_press(), _color_picker_button_release(), _color_picker_draw(), _color_picker_motion(), _color_swatch_button_press(), _color_swatch_draw(), _create_background_clicked(), _create_layer_clicked(), _delete_layer_clicked(), _develop_ui_pipe_finished_callback(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _ensure_gui_conf_defaults(), _ensure_layer_name(), _fill_black_clicked(), _fill_transparent_clicked(), _fill_white_clicked(), _layer_selected(), _load_color_history(), _preview_bg_toggled(), _sanitize_params(), _save_layer_clicked(), _widget_changed(), darktable_t::bauhaus, c, darktable, dt_iop_module_t::dev, dt_accels_disconnect_on_text_input(), dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_factor(), dt_bauhaus_slider_set_format(), dt_bauhaus_widget_set_label(), dt_color_picker_new_with_cst(), DT_COLOR_PICKER_POINT_AREA, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_DRAWLAYER_COLOR_HISTORY_HEIGHT, DT_DRAWLAYER_COLOR_PICKER_HEIGHT, dt_drawlayer_process_state_init(), dt_drawlayer_runtime_manager_init(), dt_drawlayer_runtime_manager_update(), dt_drawlayer_widgets_init(), dt_drawlayer_worker_init(), dt_drawlayer_worker_replay_finished_stroke_to_base_patch(), dt_gui_add_class(), DT_GUI_IOP_MODULE_CONTROL_SPACING, DT_GUI_MODULE, DT_PIXEL_APPLY_DPI, DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED, FALSE, g, dt_iop_module_t::gui_data, IOP_CS_NONE, IOP_GUI_ALLOC, dt_iop_module_t::params, r, dt_iop_module_t::reset_button, dt_develop_t::roi, dt_drawlayer_runtime_context_t::runtime, dt_develop_t::scaling, dt_drawlayer_runtime_request_t::self, darktable_t::signals, TRUE, dt_drawlayer_runtime_host_t::user_data, dt_iop_module_t::widget, dt_develop_t::x, and dt_develop_t::y.
| void gui_post_expose | ( | dt_iop_module_t * | self, |
| cairo_t * | cr, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| int32_t | pointerx, | ||
| int32_t | pointery | ||
| ) |
Draw post-expose overlay (cursor, HUD, temp preview).
References _compute_hud_brush_state(), _conf_brush_mode(), _draw_brush_hud(), _ensure_cursor_stamp_surface(), _layer_to_widget_coords, dt_iop_module_t::dev, dt_control_get_pointer_input(), dt_dev_get_overlay_scale(), DT_DRAWLAYER_BRUSH_MODE_PAINT, dt_drawlayer_widget_brush_radius(), dt_drawlayer_widget_to_layer_coords(), g, dt_iop_module_t::gui_data, dt_develop_t::gui_module, drawlayer_hud_brush_state_t::hardness, M_PI, drawlayer_hud_brush_state_t::opacity, drawlayer_hud_brush_state_t::radius, dt_control_pointer_input_t::x, dt_drawlayer_brush_dab_t::x, and dt_control_pointer_input_t::y.
| void gui_reset | ( | dt_iop_module_t * | self | ) |
Reset GUI/session state for current drawlayer instance.
References _commit_dabs, _confirm_delete_layer(), _default_layer_name(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _touch_stroke_commit_hash, dt_iop_module_t::dev, dt_drawlayer_runtime_manager_update(), FALSE, g, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, and dt_drawlayer_runtime_host_t::user_data.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
References _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(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _ensure_layer_name(), _populate_layer_list(), _sanitize_params(), _sync_brush_profile_preview_widget(), _sync_color_picker_from_conf(), _sync_mode_sensitive_widgets(), _sync_preview_bg_buttons(), dt_iop_module_t::dev, 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_set(), dt_bauhaus_slider_set(), dt_conf_get_bool(), dt_drawlayer_runtime_manager_update(), g, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, and dt_drawlayer_runtime_host_t::user_data.
Referenced by _create_new_layer(), _delete_layer_clicked(), and _layer_selected().
| void init | ( | dt_iop_module_t * | module | ) |
Allocate and initialize module parameter blocks.
References dt_iop_module_t::default_params, and dt_iop_module_t::params.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, dt_drawlayer_process_state_init(), dt_drawlayer_runtime_manager_bind_piece(), dt_drawlayer_runtime_manager_init(), FALSE, dt_iop_drawlayer_data_t::headless_manager, dt_iop_drawlayer_params_t::layer_order, dt_iop_drawlayer_data_t::params, dt_iop_drawlayer_data_t::process, dt_iop_drawlayer_data_t::runtime_display_pipe, dt_iop_drawlayer_data_t::runtime_manager, and dt_iop_drawlayer_data_t::runtime_process.
| gboolean module_will_remove | ( | dt_iop_module_t * | self | ) |
Hook called before module removal from history stack.
References _commit_dabs, _confirm_delete_layer(), _flush_layer_cache, dt_iop_module_t::dev, FALSE, and TRUE.
| int mouse_leave | ( | dt_iop_module_t * | self | ) |
Mouse leave handler.
References _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, DT_DRAWLAYER_RUNTIME_EVENT_GUI_MOUSE_LEAVE, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, dt_drawlayer_runtime_update_request_t::event, g, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, update(), and dt_drawlayer_runtime_host_t::user_data.
| int mouse_moved | ( | dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
Mouse motion handler.
References _build_raw_input_event(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, darktable, dt_iop_module_t::dev, DT_DRAWLAYER_PAINT_STROKE_MIDDLE, DT_DRAWLAYER_RUNTIME_EVENT_GUI_MOUSE_LEAVE, DT_DRAWLAYER_RUNTIME_EVENT_GUI_RAW_INPUT, DT_DRAWLAYER_RUNTIME_EVENT_GUI_STROKE_ABORT, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, DT_DRAWLAYER_RUNTIME_RAW_INPUT_SAMPLE, DT_REQUEST_COLORPICK_OFF, dt_ui_center(), dt_drawlayer_runtime_update_request_t::event, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, dt_drawlayer_runtime_result_t::ok, dt_iop_module_t::params, dt_drawlayer_runtime_result_t::raw_input_ok, dt_iop_module_t::request_color_pick, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, dt_gui_gtk_t::ui, update(), dt_drawlayer_runtime_host_t::user_data, and x.
| const char * name | ( | ) |
Module display name.
Referenced by _default_layer_name(), _layer_name_non_empty(), and _sanitize_requested_layer_name().
| int process | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const dt_iop_roi_t *const | roi_out | ||
| ) |
CPU processing path for layer-over-input compositing.
References _blend_layer_over_input(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, _get_process_scratch(), _resolve_preview_background(), _update_runtime_state(), darktable, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_drawlayer_runtime_source_t::direct_copy, DT_DEBUG_PERF, DT_DEBUG_VERBOSE, dt_drawlayer_cache_build_process_blend_rois(), dt_drawlayer_cache_ensure_scratch_buffer(), dt_drawlayer_cache_patch_rdlock(), dt_drawlayer_cache_patch_rdunlock(), DT_DRAWLAYER_RUNTIME_EVENT_PROCESS_CPU_AFTER, DT_DRAWLAYER_RUNTIME_EVENT_PROCESS_CPU_BEFORE, dt_drawlayer_runtime_manager_bind_piece(), dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, DT_DRAWLAYER_SOURCE_GUI_PROCESS, dt_iop_clip_and_zoom(), dt_iop_image_copy_by_size(), dt_print(), drawlayer_preview_background_t::enabled, dt_drawlayer_runtime_update_request_t::event, FALSE, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_drawlayer_cache_patch_t::height, dt_drawlayer_runtime_source_t::kind, dt_iop_drawlayer_params_t::layer_name, drawlayer_process_scratch_t::layerbuf, drawlayer_process_scratch_t::layerbuf_pixels, dt_iop_drawlayer_gui_data_t::manager, dt_drawlayer_runtime_request_t::manager, dt_iop_drawlayer_data_t::params, dt_drawlayer_process_view_t::patch, dt_develop_t::pipe, dt_dev_pixelpipe_iop_t::pipe, dt_drawlayer_cache_patch_t::pixels, dt_drawlayer_runtime_source_t::pixels, dt_develop_t::preview_pipe, dt_iop_drawlayer_gui_data_t::process, dt_drawlayer_runtime_release_t::process, dt_drawlayer_process_state_t::process_patch_padding, dt_drawlayer_runtime_request_t::process_state, dt_drawlayer_runtime_source_t::process_view, dt_drawlayer_runtime_update_request_t::release, dt_drawlayer_runtime_context_t::runtime, dt_iop_drawlayer_data_t::runtime_display_pipe, dt_iop_drawlayer_data_t::runtime_manager, dt_iop_drawlayer_data_t::runtime_process, dt_drawlayer_runtime_request_t::self, dt_drawlayer_runtime_source_t::source_roi, dt_drawlayer_runtime_source_t::target_roi, TRUE, darktable_t::unmuted, dt_drawlayer_runtime_host_t::user_data, drawlayer_preview_background_t::value, dt_iop_roi_t::width, dt_drawlayer_cache_patch_t::width, and dt_drawlayer_runtime_source_t::width.
Referenced by _update_runtime_state().
| int scrolled | ( | dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | up, | ||
| uint32_t | state | ||
| ) |
Scroll handler used for interactive brush-size changes.
References _conf_size(), _drawlayer_runtime_collect_inputs, _drawlayer_runtime_perform_action, dt_iop_module_t::dev, DRAWLAYER_CONF_SIZE, dt_bauhaus_slider_set(), dt_conf_set_float(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SCROLL, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, dt_mask_scroll_increases(), dt_drawlayer_runtime_update_request_t::event, factor, g, dt_iop_module_t::gui_data, dt_develop_t::gui_module, dt_iop_module_t::params, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_request_t::self, update(), and dt_drawlayer_runtime_host_t::user_data.
|
static |
Referenced by _get_process_scratch().