![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Drawlayer module entrypoints and runtime orchestration. More...
#include "develop/masks_gui.h"#include "widgets/bauhaus.h"#include "common/colorspaces_inline_conversions.h"#include "system/dtpthread.h"#include "common/imagebuf.h"#include "imageio/imageio_module.h"#include "develop/iop_profile.h"#include "common/opencl.h"#include "common/conf.h"#include "control/control.h"#include "control/jobs.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/masks.h"#include "caches/pixelpipe_cache.h"#include "pixel/interpolation.h"#include "gui/color_picker_proxy.h"#include "gui/application.h"#include "develop/gui_throttle.h"#include "iop/drawlayer/brush.h"#include "iop/drawlayer/cache.h"#include "iop/drawlayer/common.h"#include "iop/drawlayer/conf.h"#include "iop/drawlayer/layers.h"#include "iop/drawlayer/coordinates.h"#include "iop/drawlayer/io.h"#include "iop/drawlayer/module.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 "widgets/notebook.h"#include "widgets/widget_style.h"#include "control/signal.h"
Include dependency graph for drawlayer.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_drawlayer_global_data_t |
| struct | drawlayer_preview_background_t |
| struct | drawlayer_wait_dialog_t |
| struct | drawlayer_process_scratch_t |
| struct | drawlayer_cl_image_handle_t |
| struct | drawlayer_blend_cl_request_t |
| Everything the GPU layer-over-input blend needs, in one place. More... | |
| struct | drawlayer_modal_wait_state_t |
| struct | drawlayer_hud_brush_state_t |
Macros | |
| #define | DRAWLAYER_RESAMPLE_DAMAGE_MARGIN 8 |
Typedefs | |
| typedef struct dt_iop_drawlayer_global_data_t | dt_iop_drawlayer_global_data_t |
| typedef struct drawlayer_preview_background_t | drawlayer_preview_background_t |
| typedef dt_drawlayer_runtime_request_t | drawlayer_runtime_request_t |
| typedef dt_drawlayer_runtime_context_t | drawlayer_runtime_host_context_t |
| typedef struct drawlayer_wait_dialog_t | drawlayer_wait_dialog_t |
| typedef struct drawlayer_process_scratch_t | drawlayer_process_scratch_t |
| typedef struct drawlayer_cl_image_handle_t | drawlayer_cl_image_handle_t |
| typedef struct drawlayer_blend_cl_request_t | drawlayer_blend_cl_request_t |
| Everything the GPU layer-over-input blend needs, in one place. | |
| typedef struct drawlayer_modal_wait_state_t | drawlayer_modal_wait_state_t |
| typedef struct drawlayer_hud_brush_state_t | 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) |
| static void | _sync_mode_sensitive_widgets (dt_iop_module_t *self) |
| void | dt_drawlayer_refresh_layer_widgets (dt_iop_module_t *self) |
| static void | _sync_layer_controls (dt_iop_module_t *self) |
| static void | _sanitize_requested_layer_name (const char *requested, char *name, size_t name_size) |
| static gboolean | _prompt_layer_name_dialog (const char *title, const char *message, const char *initial_name, char *name, size_t name_size) |
| 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 gboolean | _background_layer_job_done_idle (gpointer user_data) |
| 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 void | _brush_pipeline_color_from_display (dt_iop_module_t *self, const float display_rgb[3], float pipeline_rgb[3]) |
| Convert one display-space brush color snapshot to pipeline space. | |
| void | dt_drawlayer_sync_cached_brush_colors (dt_iop_module_t *self, const float display_rgb[3]) |
| Cache brush colors in GUI state so stroke input snapshots don't re-transform per event. | |
| static void | _refresh_brush_settings_cache (dt_iop_drawlayer_gui_data_t *g) |
| Re-resolve the brush from conf into the GUI-side cache. | |
| void | dt_drawlayer_invalidate_brush_settings_cache (dt_iop_drawlayer_gui_data_t *g) |
| 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) |
| gboolean | dt_drawlayer_layer_name_non_empty (const char *name) |
| gboolean | dt_drawlayer_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 | _destroy_process_scratch (gpointer data) |
| static drawlayer_process_scratch_t * | _get_process_scratch (void) |
| gboolean | dt_drawlayer_rekey_shared_base_patch (drawlayer_patch_t *patch, const int32_t imgid, const dt_iop_drawlayer_params_t *params) |
| void | dt_drawlayer_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 | __attribute__ ((always_inline)) |
| static __DT_CLONE_TARGETS__ 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 | _drawlayer_sync_host_image_to_device (const int devid, cl_mem device_image, void *host_pixels, const int width, const int height, const int bpp, const dt_drawlayer_damaged_rect_t *dirty_rect) |
| static gboolean | _drawlayer_acquire_source_image (const int devid, const float *layer_pixels, dt_pixel_cache_entry_t *resolved_entry, const gboolean realtime_reuse, const int source_w, const int source_h, dt_drawlayer_process_state_t *process, drawlayer_cl_image_handle_t *source) |
| static int | _drawlayer_copy_or_resample_layer_roi (const int devid, cl_mem dev_source_rgba, cl_mem dev_layer_rgba, const int source_w, const int source_h, const dt_iop_roi_t *const target_roi, const dt_iop_roi_t *const source_roi) |
| static gboolean | _drawlayer_acquire_layer_image (const int devid, dt_pixel_cache_entry_t *resolved_entry, const gboolean realtime_reuse, cl_mem dev_source_rgba, const int source_w, const int source_h, const dt_iop_roi_t *const target_roi, const dt_iop_roi_t *const source_roi, drawlayer_cl_image_handle_t *layer, int *err) |
| static int | _drawlayer_run_premult_over_kernel (const int devid, const int kernel_premult_over, cl_mem dev_background, cl_mem dev_layer_rgba, cl_mem dev_out, const int width, const int height, const int background_offset_x, const int background_offset_y) |
| static gboolean | _drawlayer_map_source_damage_to_target (const dt_drawlayer_damaged_rect_t *src_damage, const dt_iop_roi_t *const target_roi, const dt_iop_roi_t *const source_roi, dt_drawlayer_damaged_rect_t *out) |
| static int | _blend_layer_over_input_cl (const drawlayer_blend_cl_request_t *const req) |
| static gboolean | _profile_key_is_sane (const char *value) |
| int64_t | dt_drawlayer_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) |
| 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_t *pipe, const float working_rgb[3], float display_rgb[3]) |
| static gboolean | _brush_paints_color (void) |
| Does the brush currently lay down the chosen colour? | |
| void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, 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) |
| void | dt_drawlayer_sanitize_params (dt_iop_module_t *self, dt_iop_drawlayer_params_t *params) |
| 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 | _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 void | _widget_changed (GtkWidget *widget, gpointer user_data) |
| static gboolean | _apply_selected_layer_attachment (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g, dt_iop_drawlayer_params_t *params, const char *layer_name, const int layer_order) |
| Apply one selected on-disk layer from the combobox to module params/history. | |
| static void | _layer_selected (GtkWidget *widget, gpointer user_data) |
| static void | _attach_selected_layer_clicked (GtkButton *button, gpointer user_data) |
| static void | _rename_layer_clicked (GtkButton *button, 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. | |
| void | init_global (dt_iop_module_so_t *module) |
| Initialize global OpenCL resources for drawlayer kernels. | |
| void | cleanup_global (dt_iop_module_so_t *module) |
| Release global OpenCL resources for drawlayer. | |
| 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, const 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. | |
| static void | _build_brush_tab (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g, GtkWidget *brush_tab) |
| Build the Brush tab: mode, colour, geometry, thickness and texture. | |
| static void | _build_layer_tab (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g, GtkWidget *layer_tab) |
| Build the Layer tab: the Background choice, the layer list and its actions. | |
| static void | _build_input_tab (dt_iop_module_t *self, dt_iop_drawlayer_gui_data_t *g, GtkWidget *input_tab) |
| Build the Input tab: the tablet-mapping grid and its profile combos. | |
| 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 | quiesce (dt_iop_module_t *self) |
| Destroy GUI resources and stop background worker. | |
| void | gui_cleanup (dt_iop_module_t *self) |
| 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. | |
| static drawlayer_runtime_request_t | _process_bind_runtime (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, dt_iop_drawlayer_gui_data_t *gui, const gboolean have_gui, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const gboolean use_opencl) |
| Everything process() and process_cl() must do identically before they diverge. | |
| int | process_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out) |
| OpenCL processing path for layer-over-input compositing. | |
| __DT_CLONE_TARGETS__ int | process (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid) |
| 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.
Definition in file drawlayer.c.
| #define DRAWLAYER_RESAMPLE_DAMAGE_MARGIN 8 |
Definition at line 874 of file drawlayer.c.
| typedef struct drawlayer_blend_cl_request_t drawlayer_blend_cl_request_t |
Everything the GPU layer-over-input blend needs, in one place.
It used to be sixteen positional arguments at a single call site, four of them adjacent same-typed neighbours (two ints for the source size, two gbooleans for the reuse and partial policies) where a transposition compiles silently and changes what is composited. Named fields at the call site make that mistake unwriteable.
| typedef struct drawlayer_cl_image_handle_t drawlayer_cl_image_handle_t |
| typedef struct drawlayer_hud_brush_state_t drawlayer_hud_brush_state_t |
| typedef struct drawlayer_modal_wait_state_t drawlayer_modal_wait_state_t |
| typedef struct drawlayer_preview_background_t drawlayer_preview_background_t |
| typedef struct drawlayer_process_scratch_t drawlayer_process_scratch_t |
Definition at line 125 of file drawlayer.c.
Definition at line 124 of file drawlayer.c.
| typedef struct drawlayer_wait_dialog_t drawlayer_wait_dialog_t |
| typedef struct dt_iop_drawlayer_global_data_t dt_iop_drawlayer_global_data_t |
|
inlinestatic |
Definition at line 492 of file drawlayer.c.
References dt_drawlayer_process_state_t::base_patch, dt_drawlayer_process_state_t::cache_dirty, dt_drawlayer_process_state_t::cache_dirty_rect, 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, dt_dev_pixelpipe_t::dev, 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_paint_runtime_state_reset(), dt_drawlayer_process_state_invalidate(), DT_PATH_MAX, FALSE, dt_drawlayer_io_layer_info_t::found, dt_drawlayer_cache_patch_t::height, dt_drawlayer_io_patch_t::height, dt_drawlayer_io_layer_info_t::height, dt_image_t::id, dt_develop_t::image_storage, dt_drawlayer_io_layer_info_t::index, IS_NULL_PTR, layer_height, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, layer_width, params, piece, pipe, dt_drawlayer_cache_patch_t::pixels, dt_drawlayer_io_patch_t::pixels, dt_iop_drawlayer_data_t::process, TRUE, dt_drawlayer_cache_patch_t::width, dt_drawlayer_io_patch_t::width, dt_drawlayer_io_layer_info_t::width, 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.
|
static |
Apply one selected on-disk layer from the combobox to module params/history.
Definition at line 2333 of file drawlayer.c.
References _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_layer_name_non_empty(), dt_drawlayer_refresh_layer_widgets(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, dt_drawlayer_touch_stroke_commit_hash(), FALSE, g, gui_update(), IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, params, and TRUE.
Referenced by _attach_selected_layer_clicked(), and _layer_selected().
|
static |
Definition at line 2385 of file drawlayer.c.
References _apply_selected_layer_attachment(), dt_iop_module_t::dev, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), dt_drawlayer_layer_name_non_empty(), dt_iop_gui_data(), g, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_module_t::params, params, and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 2188 of file drawlayer.c.
References dt_control_log(), dt_dev_get_global(), dt_drawlayer_refresh_layer_widgets(), dt_free, dt_iop_gui_data(), FALSE, g, 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, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, dt_drawlayer_io_background_job_result_t::message, params, dt_iop_drawlayer_params_t::sidecar_timestamp, 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 |
Definition at line 648 of file drawlayer.c.
References __OMP_PARALLEL_FOR__, _clamp01(), dt_store_simd_aligned(), and IS_NULL_PTR.
Referenced by process().
|
static |
Definition at line 946 of file drawlayer.c.
References __OMP_PARALLEL_FOR__, _drawlayer_acquire_layer_image(), _drawlayer_acquire_source_image(), _drawlayer_copy_or_resample_layer_roi(), _drawlayer_map_source_damage_to_target(), _drawlayer_run_premult_over_kernel(), drawlayer_blend_cl_request_t::allow_partial, dt_drawlayer_process_state_t::cache_dirty_rect, drawlayer_process_scratch_t::cl_background_rgba, drawlayer_process_scratch_t::cl_background_rgba_pixels, cleanup(), drawlayer_blend_cl_request_t::dev_in, drawlayer_blend_cl_request_t::dev_out, drawlayer_blend_cl_request_t::devid, DT_DEBUG_OPENCL, DT_DEBUG_PERF, DT_DEBUG_VERBOSE, dt_dev_pixelpipe_cache_get_pinned_image(), dt_dev_pixelpipe_cache_put_pinned_image(), dt_dev_pixelpipe_cache_ref_count_entry(), dt_dev_pixelpipe_cache_ref_entry_for_host_ptr(), dt_dev_pixelpipe_cache_release_cl_buffer(), dt_drawlayer_cache_ensure_scratch_buffer(), dt_get_debug_flags(), dt_opencl_alloc_device(), dt_opencl_enqueue_copy_image(), dt_opencl_finish(), dt_opencl_release_mem_object(), dt_print(), FALSE, dt_iop_roi_t::height, drawlayer_cl_image_handle_t::is_cached_device, IS_NULL_PTR, drawlayer_cl_image_handle_t::is_pinned, drawlayer_blend_cl_request_t::kernel_premult_over, drawlayer_blend_cl_request_t::layer_pixels, drawlayer_cl_image_handle_t::mem, dt_drawlayer_damaged_rect_t::nw, drawlayer_blend_cl_request_t::preview_bg, drawlayer_blend_cl_request_t::process, drawlayer_blend_cl_request_t::realtime_reuse, dt_iop_roi_t::scale, drawlayer_blend_cl_request_t::scratch, dt_drawlayer_damaged_rect_t::se, drawlayer_blend_cl_request_t::source_entry, drawlayer_blend_cl_request_t::source_h, drawlayer_blend_cl_request_t::source_roi, drawlayer_blend_cl_request_t::source_w, drawlayer_blend_cl_request_t::target_roi, TRUE, drawlayer_blend_cl_request_t::use_preview_bg, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by process_cl().
|
static |
Does the brush currently lay down the chosen colour?
Asked in two places that must agree: the panel, which shows the colour swatch and the pickers only when the answer is yes, and the on-canvas cursor, which fills its stamp with that colour for the same reason. They were two separate comparisons 1600 lines apart, in two spellings, with nothing forcing them to be read together – the shape that has cost this tree the CFA phase, retouch's mask preview and display encoding's conf reads. Add a mode that paints with a colour and one of them would grow while the other did not: the panel offering a colour the cursor draws hollow, or the reverse.
Definition at line 1490 of file drawlayer.c.
References DT_DRAWLAYER_BRUSH_MODE_PAINT, and dt_drawlayer_conf_brush_mode().
Referenced by _sync_mode_sensitive_widgets(), and gui_post_expose().
|
static |
Convert one display-space brush color snapshot to pipeline space.
Definition at line 152 of file drawlayer.c.
References _clamp01(), dt_iop_module_t::dev, dt_drawlayer_conf_hdr_exposure(), dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_pipe_output_profile_info(), dt_ioppr_transform_image_colorspace_rgb(), dt_develop_t::iop, IS_NULL_PTR, out, and dt_develop_t::pipe.
Referenced by _fill_input_brush_settings(), and dt_drawlayer_sync_cached_brush_colors().
|
static |
Definition at line 1429 of file drawlayer.c.
References _sync_brush_profile_preview_widget(), _sync_mode_sensitive_widgets(), _update_gui_runtime_manager(), DT_DRAWLAYER_BRUSH_SHAPE_LINEAR, dt_drawlayer_conf_sync_params_from_gui(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, dt_drawlayer_widgets_pick_brush_profile(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and TRUE.
Referenced by _build_brush_tab().
|
static |
Definition at line 1420 of file drawlayer.c.
References dt_drawlayer_widgets_draw_brush_profiles(), dt_gui_get_global(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and dt_gui_gtk_t::ppd.
Referenced by _build_brush_tab().
|
static |
Build the Brush tab: mode, colour, geometry, thickness and texture.
The largest of the three and entirely stereotyped – a control, its tooltip, its range, its pack. It reads nothing of the module's own state; everything it builds is reached afterwards through g->controls.
Definition at line 2925 of file drawlayer.c.
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(), _widget_changed(), dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_get_global(), 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_DRAWLAYER_COLOR_HISTORY_HEIGHT, DT_DRAWLAYER_COLOR_PICKER_HEIGHT, dt_gui_add_class(), DT_GUI_BOX_SPACING, DT_GUI_MODULE, DT_PIXEL_APPLY_DPI, g, IOP_CS_NONE, and TRUE.
Referenced by gui_init().
|
static |
Build the Input tab: the tablet-mapping grid and its profile combos.
The grid is three input axes by four brush properties, and the two tables below are the only statement of which cell is which control. They stay inside this function along with the signal loop that reads them – a table that escapes its builder is a table some other function starts spelling out by hand, which is what happened to gui_update.
Definition at line 3146 of file drawlayer.c.
References _widget_changed(), dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_get_global(), dt_drawlayer_mapping_rows(), DT_DRAWLAYER_MAPPING_ROWS, DT_DRAWLAYER_MAPPING_TARGETS, DT_GUI_BOX_SPACING, DT_GUI_MODULE, FALSE, g, dt_drawlayer_mapping_row_t::profile, r, dt_drawlayer_mapping_row_t::targets, and dt_drawlayer_mapping_cell_t::widget.
Referenced by gui_init().
|
static |
Build the Layer tab: the Background choice, the layer list and its actions.
The Background radios and the layer box pack into the same tab and were written a hundred lines apart, with the whole Brush tab between them; the previous commit moved them together so this one could lift them out.
Definition at line 3063 of file drawlayer.c.
References _attach_selected_layer_clicked(), _create_background_clicked(), _create_layer_clicked(), _delete_layer_clicked(), _fill_black_clicked(), _fill_transparent_clicked(), _fill_white_clicked(), _layer_selected(), _preview_bg_toggled(), _rename_layer_clicked(), dt_bauhaus_combobox_new(), dt_bauhaus_get_global(), dt_bauhaus_widget_set_label(), DT_GUI_BOX_SPACING, DT_GUI_MODULE, FALSE, g, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 2168 of file drawlayer.c.
References dt_iop_module_t::dev, dt_dev_distort_get_iop_pipe(), IS_NULL_PTR, dt_dev_pixelpipe_t::nodes, piece, and dt_develop_t::pipe.
Referenced by _create_background_layer_from_input().
|
static |
Definition at line 2641 of file drawlayer.c.
References _clamp01(), _fill_input_brush_settings(), _fill_input_layer_coords(), dt_control_pointer_input_t::acceleration, dt_control_get_pointer_input(), dt_iop_gui_data(), FALSE, g, dt_control_pointer_input_t::has_pressure, IS_NULL_PTR, 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().
|
static |
Definition at line 2474 of file drawlayer.c.
References _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_commit_dabs(), dt_drawlayer_layers_reset_stroke_session(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, dt_drawlayer_touch_stroke_commit_hash(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, dt_iop_module_t::params, params, and TRUE.
Referenced by _fill_transparent_clicked().
|
static |
Definition at line 1514 of file drawlayer.c.
References _color_picker_set_from_position(), FALSE, IS_NULL_PTR, and void().
Referenced by _build_brush_tab().
|
static |
Definition at line 1522 of file drawlayer.c.
References dt_drawlayer_conf_remember_display_color(), dt_drawlayer_widgets_finish_picker_drag(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and void().
Referenced by _build_brush_tab().
|
static |
Definition at line 1380 of file drawlayer.c.
References dt_drawlayer_widgets_draw_picker(), dt_gui_get_global(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and dt_gui_gtk_t::ppd.
Referenced by _build_brush_tab().
|
static |
Definition at line 1537 of file drawlayer.c.
References _color_picker_set_from_position(), dt_drawlayer_widgets_is_picker_dragging(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and void().
Referenced by _build_brush_tab().
|
static |
Definition at line 1369 of file drawlayer.c.
References dt_drawlayer_conf_apply_display_brush_color(), dt_drawlayer_widgets_update_from_picker_position(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, TRUE, and x.
Referenced by _color_picker_button_press(), and _color_picker_motion().
|
static |
Definition at line 1397 of file drawlayer.c.
References dt_drawlayer_conf_apply_display_brush_color(), dt_drawlayer_widgets_pick_history_color(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and TRUE.
Referenced by _build_brush_tab().
|
static |
Definition at line 1389 of file drawlayer.c.
References dt_drawlayer_widgets_draw_swatch(), dt_iop_gui_data(), FALSE, g, and IS_NULL_PTR.
Referenced by _build_brush_tab().
|
static |
Definition at line 3437 of file drawlayer.c.
References _clamp01(), _mapping_profile_value(), dt_control_pointer_input_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(), dt_drawlayer_conf_flow(), dt_drawlayer_conf_hardness(), dt_drawlayer_conf_mapping_profile(), dt_drawlayer_conf_opacity(), dt_drawlayer_conf_size(), dt_control_pointer_input_t::has_pressure, dt_control_pointer_input_t::has_tilt, IS_NULL_PTR, dt_control_pointer_input_t::pressure, state, and dt_control_pointer_input_t::tilt.
Referenced by gui_post_expose().
|
static |
Definition at line 1987 of file drawlayer.c.
References _delete_current_layer(), dt_iop_module_t::dev, dt_drawlayer_layer_name_non_empty(), dt_gui_main_window(), FALSE, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_module_t::params, params, and TRUE.
Referenced by _delete_layer_clicked(), gui_reset(), and module_will_remove().
|
static |
Definition at line 2611 of file drawlayer.c.
References _create_background_layer_from_input(), dt_control_log(), and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 2240 of file drawlayer.c.
References _background_layer_job_done_idle(), _build_pre_module_filter_string(), dt_drawlayer_io_layer_info_t::count, drawlayer_dir_info_t::count, 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_get_global(), dt_control_job_add_progress(), dt_control_job_create(), dt_control_job_set_params(), dt_dev_distort_get_iop_pipe(), dt_drawlayer_commit_dabs(), dt_drawlayer_ensure_layer_cache(), dt_drawlayer_flush_layer_cache(), dt_drawlayer_io_background_layer_job_run(), dt_drawlayer_io_find_layer(), dt_drawlayer_io_sidecar_path(), dt_drawlayer_layer_name_non_empty(), dt_free, dt_iop_gui_data(), DT_JOB_QUEUE_USER_BG, DT_PATH_MAX, FALSE, dt_drawlayer_io_background_job_params_t::filter, dt_drawlayer_io_layer_info_t::found, drawlayer_dir_info_t::found, g, dt_drawlayer_io_layer_info_t::height, drawlayer_dir_info_t::height, dt_image_t::id, dt_develop_t::image_storage, dt_drawlayer_io_background_job_params_t::imgid, dt_drawlayer_io_layer_info_t::index, drawlayer_dir_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, IS_NULL_PTR, dt_drawlayer_io_background_job_params_t::layer_height, layer_height, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, dt_drawlayer_io_background_job_params_t::layer_width, layer_width, dt_drawlayer_io_layer_info_t::name, drawlayer_dir_info_t::name, dt_iop_module_t::params, params, piece, dt_develop_t::pipe, dt_drawlayer_io_background_job_params_t::requested_bg_name, dt_drawlayer_io_background_job_params_t::sidecar_path, TRUE, dt_drawlayer_io_layer_info_t::width, drawlayer_dir_info_t::width, dt_iop_drawlayer_params_t::work_profile, dt_drawlayer_io_layer_info_t::work_profile, dt_drawlayer_io_background_job_params_t::work_profile, and drawlayer_dir_info_t::work_profile.
Referenced by _create_background_clicked().
|
static |
Definition at line 2595 of file drawlayer.c.
References _create_new_layer(), _prompt_layer_name_dialog(), DRAWLAYER_NAME_SIZE, dt_control_log(), IS_NULL_PTR, and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 2098 of file drawlayer.c.
References _sanitize_requested_layer_name(), _show_drawlayer_modal_message(), _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_commit_dabs(), dt_drawlayer_flush_layer_cache(), dt_drawlayer_io_layer_name_exists(), dt_drawlayer_io_sidecar_path(), dt_drawlayer_refresh_layer_widgets(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, dt_drawlayer_touch_stroke_commit_hash(), dt_iop_gui_data(), DT_PATH_MAX, FALSE, g, gui_update(), dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, dt_iop_module_t::params, params, dt_iop_drawlayer_params_t::sidecar_timestamp, TRUE, and dt_iop_drawlayer_params_t::work_profile.
Referenced by _create_layer_clicked().
|
static |
Definition at line 1926 of file drawlayer.c.
References dt_iop_module_t::dev, dt_dev_geometry_snapshot(), dt_drawlayer_cache_patch_clear(), dt_drawlayer_io_delete_layer(), dt_drawlayer_io_sidecar_path(), dt_drawlayer_layer_name_non_empty(), dt_drawlayer_layers_append_error(), dt_drawlayer_layers_log_errors(), dt_drawlayer_layers_reset_stroke_session(), dt_drawlayer_paint_runtime_state_reset(), dt_drawlayer_refresh_layer_widgets(), dt_drawlayer_release_all_base_patch_extra_refs(), dt_iop_gui_data(), DT_PATH_MAX, FALSE, g, geometry, dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, layer_height, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, layer_width, dt_iop_module_t::params, params, dt_iop_drawlayer_params_t::sidecar_timestamp, TRUE, and dt_iop_drawlayer_params_t::work_profile.
Referenced by _confirm_delete_layer().
|
static |
Definition at line 2421 of file drawlayer.c.
References _confirm_delete_layer(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_drawlayer_commit_dabs(), dt_drawlayer_refresh_layer_widgets(), dt_drawlayer_touch_stroke_commit_hash(), FALSE, gui_update(), IS_NULL_PTR, dt_iop_module_t::params, params, TRUE, and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 377 of file drawlayer.c.
References drawlayer_process_scratch_t::cl_background_rgba, dt_drawlayer_cache_free_temp_buffer(), dt_free, IS_NULL_PTR, and drawlayer_process_scratch_t::layerbuf.
|
static |
Definition at line 1902 of file drawlayer.c.
References _update_gui_runtime_manager(), dt_iop_module_t::dev, DT_DRAWLAYER_RUNTIME_EVENT_GUI_PIPE_FINISHED, dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and void().
Referenced by gui_cleanup(), and gui_init().
|
static |
Definition at line 3482 of file drawlayer.c.
References DT_PIXEL_APPLY_DPI, i, IS_NULL_PTR, state, and x.
Referenced by gui_post_expose().
|
static |
Definition at line 816 of file drawlayer.c.
References _drawlayer_copy_or_resample_layer_roi(), dt_dev_pixelpipe_cache_get_cl_buffer(), dt_opencl_alloc_device(), FALSE, dt_iop_roi_t::height, drawlayer_cl_image_handle_t::is_cached_device, IS_NULL_PTR, drawlayer_cl_image_handle_t::mem, and dt_iop_roi_t::width.
Referenced by _blend_layer_over_input_cl().
|
static |
Definition at line 721 of file drawlayer.c.
References _drawlayer_sync_host_image_to_device(), dt_dev_pixelpipe_cache_get_cl_buffer(), dt_dev_pixelpipe_cache_get_pinned_image(), dt_dev_pixelpipe_cache_release_cl_buffer(), dt_drawlayer_paint_runtime_state_reset(), dt_opencl_alloc_device_use_host_pointer(), dt_opencl_copy_host_to_device(), dt_opencl_release_mem_object(), FALSE, drawlayer_cl_image_handle_t::is_cached_device, IS_NULL_PTR, drawlayer_cl_image_handle_t::is_pinned, drawlayer_cl_image_handle_t::mem, process(), TRUE, and dt_iop_roi_t::width.
Referenced by _blend_layer_over_input_cl().
|
static |
Definition at line 785 of file drawlayer.c.
References DT_INTERPOLATION_BILINEAR, dt_interpolation_new(), dt_interpolation_resample_cl(), dt_opencl_enqueue_copy_image(), dt_iop_roi_t::height, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _blend_layer_over_input_cl(), and _drawlayer_acquire_layer_image().
|
static |
Definition at line 881 of file drawlayer.c.
References double(), DRAWLAYER_RESAMPLE_DAMAGE_MARGIN, FALSE, dt_iop_roi_t::height, IS_NULL_PTR, dt_drawlayer_damaged_rect_t::nw, out, dt_iop_roi_t::scale, dt_drawlayer_damaged_rect_t::se, TRUE, dt_drawlayer_damaged_rect_t::valid, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _blend_layer_over_input_cl().
|
static |
Definition at line 1280 of file drawlayer.c.
References dt_drawlayer_worker_any_active(), IS_NULL_PTR, and state.
Referenced by dt_drawlayer_wait_for_rasterization_modal().
|
static |
Definition at line 850 of file drawlayer.c.
References dt_opencl_enqueue_kernel_2d(), dt_opencl_set_kernel_arg(), height, ROUNDUPDHT, ROUNDUPDWD, and width.
Referenced by _blend_layer_over_input_cl().
|
static |
Definition at line 686 of file drawlayer.c.
References bpp, dt_opencl_is_pinned_memory(), dt_opencl_map_image(), dt_opencl_unmap_mem_object(), dt_opencl_write_host_to_device(), dt_opencl_write_host_to_device_raw(), FALSE, height, IS_NULL_PTR, dt_drawlayer_damaged_rect_t::nw, dt_drawlayer_damaged_rect_t::se, TRUE, dt_drawlayer_damaged_rect_t::valid, and width.
Referenced by _drawlayer_acquire_source_image().
|
static |
Definition at line 1178 of file drawlayer.c.
References dt_drawlayer_brush_rasterize_dab_argb8(), dt_drawlayer_conf_brush_shape(), dt_drawlayer_conf_display_color(), dt_drawlayer_ui_cursor_clear(), dt_gui_get_global(), dt_iop_gui_data(), g, IS_NULL_PTR, MAX, dt_gui_gtk_t::ppd, and dt_drawlayer_brush_dab_t::radius.
Referenced by gui_post_expose().
|
static |
Definition at line 2509 of file drawlayer.c.
References _fill_current_layer(), dt_control_log(), and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 2436 of file drawlayer.c.
References __OMP_PARALLEL_FOR__, _clamp01(), _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_commit_dabs(), dt_drawlayer_layers_reset_stroke_session(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, dt_drawlayer_touch_stroke_commit_hash(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, k, dt_iop_module_t::params, params, TRUE, and value.
Referenced by _fill_black_clicked(), and _fill_white_clicked().
|
static |
Definition at line 248 of file drawlayer.c.
References _brush_pipeline_color_from_display(), _clamp01(), _refresh_brush_settings_cache(), 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_conf_brush_mode(), dt_drawlayer_conf_brush_shape(), dt_drawlayer_conf_display_color(), dt_drawlayer_conf_distance(), dt_drawlayer_conf_flow(), dt_drawlayer_conf_hardness(), dt_drawlayer_conf_mapping_profile(), dt_drawlayer_conf_opacity(), dt_drawlayer_conf_size(), dt_drawlayer_conf_smoothing(), dt_drawlayer_conf_sprinkle_coarseness(), dt_drawlayer_conf_sprinkle_size(), dt_drawlayer_conf_sprinkles(), dt_drawlayer_sync_cached_brush_colors(), dt_iop_gui_data(), g, IS_NULL_PTR, 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 |
Definition at line 321 of file drawlayer.c.
References DT_DEBUG_INPUT, dt_drawlayer_widget_to_layer_coords(), dt_get_debug_flags(), dt_print(), dt_drawlayer_paint_raw_input_t::event_index, FALSE, dt_drawlayer_paint_raw_input_t::have_layer_coords, IS_NULL_PTR, dt_drawlayer_paint_raw_input_t::lx, dt_drawlayer_paint_raw_input_t::ly, dt_drawlayer_paint_raw_input_t::stroke_batch, dt_drawlayer_paint_raw_input_t::stroke_pos, 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 |
Definition at line 2516 of file drawlayer.c.
References _clear_current_layer(), dt_control_log(), and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 2502 of file drawlayer.c.
References _fill_current_layer(), dt_control_log(), and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 388 of file drawlayer.c.
References _drawlayer_process_scratch_key, and IS_NULL_PTR.
Referenced by process(), and process_cl().
Definition at line 2364 of file drawlayer.c.
References _apply_selected_layer_attachment(), _sync_layer_controls(), dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), dt_drawlayer_layer_name_non_empty(), dt_gui_get_global(), dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_module_t::params, and params.
Referenced by _build_layer_tab().
|
static |
Definition at line 2618 of file drawlayer.c.
References _sync_preview_bg_buttons(), 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, dt_drawlayer_touch_stroke_commit_hash(), dt_gui_get_global(), dt_gui_widgets_suppressed(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, dt_iop_module_t::params, params, and TRUE.
Referenced by _build_layer_tab().
|
static |
Everything process() and process_cl() must do identically before they diverge.
Binds this piece to its runtime manager, refreshes the layer's base cache, and builds the request both paths hand to the runtime state machine. The only thing that legitimately differs between the two is use_opencl, and the pair of event ids each keeps for itself.
It used to be written out twice, and the two copies were still exact – checked line by line before they were merged, so nothing is being quietly normalised here. Keeping it that way was the problem: a condition duplicated between process() and process_cl() is the standing invitation to drift that CLAUDE.md names by name, and this module's own history has paid for it three times over (the CFA phase, retouch's mask preview, and display encoding's per-frame conf reads, each a branch one path grew and the other did not).
| have_gui | Passed in rather than recomputed, so the caller and this function cannot disagree about what "the GUI is attached" meant for this frame. |
Definition at line 3884 of file drawlayer.c.
References dt_iop_module_t::dev, dt_drawlayer_runtime_manager_bind_piece(), dt_iop_drawlayer_gui_data_t::manager, piece, dt_develop_t::pipe, pipe, dt_develop_t::preview_pipe, and dt_iop_drawlayer_gui_data_t::process.
Referenced by process(), and process_cl().
|
static |
Definition at line 1153 of file drawlayer.c.
References FALSE, IS_NULL_PTR, and value.
Referenced by dt_drawlayer_sanitize_params().
|
static |
Definition at line 1331 of file drawlayer.c.
References _sanitize_requested_layer_name(), dt_drawlayer_layer_name_non_empty(), DT_GUI_BOX_SPACING, dt_gui_get_global(), dt_gui_get_ui(), dt_gui_main_window(), DT_PIXEL_APPLY_DPI, FALSE, IS_NULL_PTR, name(), and TRUE.
Referenced by _create_layer_clicked(), and _rename_layer_clicked().
|
static |
Re-resolve the brush from conf into the GUI-side cache.
Every read here parses a string (dt_conf_get_float -> dt_calculator_solve), so this runs when something CHANGES the brush, not when the pointer moves. Its three runtime writers are dt_drawlayer_conf_sync_params_from_gui (every widget), the colour setter, and scrolled(); gui_update, change_image and gui_focus invalidate as well, so a path nobody enumerated still refills on the next non-motion event.
Definition at line 206 of file drawlayer.c.
References 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_conf_brush_mode(), dt_drawlayer_conf_brush_shape(), dt_drawlayer_conf_distance(), dt_drawlayer_conf_flow(), dt_drawlayer_conf_hardness(), dt_drawlayer_conf_mapping_profile(), dt_drawlayer_conf_opacity(), dt_drawlayer_conf_size(), dt_drawlayer_conf_smoothing(), dt_drawlayer_conf_sprinkle_coarseness(), dt_drawlayer_conf_sprinkle_size(), dt_drawlayer_conf_sprinkles(), g, IS_NULL_PTR, and TRUE.
Referenced by _fill_input_brush_settings().
|
static |
Definition at line 2025 of file drawlayer.c.
References _sanitize_requested_layer_name(), dt_iop_module_t::dev, DRAWLAYER_NAME_SIZE, dt_dev_add_history_item, dt_dev_geometry_snapshot(), dt_drawlayer_commit_dabs(), dt_drawlayer_flush_layer_cache(), dt_drawlayer_io_rename_layer(), dt_drawlayer_io_sidecar_path(), dt_drawlayer_layer_name_non_empty(), dt_drawlayer_layers_append_error(), dt_drawlayer_layers_log_errors(), dt_drawlayer_refresh_layer_widgets(), dt_drawlayer_sidecar_timestamp_from_path(), dt_iop_gui_data(), DT_PATH_MAX, FALSE, g, geometry, dt_image_t::id, dt_develop_t::image_storage, dt_drawlayer_io_layer_info_t::index, IS_NULL_PTR, layer_height, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, layer_width, dt_iop_module_t::params, params, dt_iop_drawlayer_params_t::sidecar_timestamp, TRUE, and dt_iop_drawlayer_params_t::work_profile.
Referenced by _rename_layer_clicked().
|
static |
Definition at line 2402 of file drawlayer.c.
References _prompt_layer_name_dialog(), _rename_current_layer_from_gui(), dt_iop_module_t::dev, DRAWLAYER_NAME_SIZE, dt_control_log(), dt_drawlayer_layer_name_non_empty(), dt_iop_gui_data(), g, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_module_t::params, params, and void().
Referenced by _build_layer_tab().
|
static |
Definition at line 459 of file drawlayer.c.
References dt_dev_pixelpipe_cache_ref_count_entry(), g, IS_NULL_PTR, and TRUE.
Referenced by dt_drawlayer_commit_dabs().
|
static |
Definition at line 1588 of file drawlayer.c.
References ch, FALSE, IS_NULL_PTR, name(), out, and TRUE.
Referenced by _create_new_layer(), _prompt_layer_name_dialog(), _rename_current_layer_from_gui(), and dt_drawlayer_sanitize_params().
|
static |
Definition at line 2523 of file drawlayer.c.
References _show_drawlayer_modal_message(), dt_iop_module_t::dev, dt_drawlayer_commit_dabs(), dt_drawlayer_flush_layer_cache(), dt_drawlayer_layer_name_non_empty(), dt_drawlayer_refresh_layer_widgets(), dt_drawlayer_rekey_shared_base_patch(), dt_drawlayer_release_all_base_patch_extra_refs(), dt_drawlayer_wait_for_rasterization_modal(), dt_gui_main_window(), dt_iop_gui_data(), FALSE, g, dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, dt_iop_module_t::params, and void().
Referenced by gui_init().
|
static |
Definition at line 1318 of file drawlayer.c.
References dt_gui_get_global(), dt_gui_get_ui(), dt_gui_main_window(), IS_NULL_PTR, and type.
Referenced by _create_new_layer(), and _save_layer_clicked().
|
static |
Definition at line 1234 of file drawlayer.c.
References drawlayer_wait_dialog_t::dialog, DT_GUI_BOX_SPACING, dt_gui_get_global(), dt_gui_get_ui(), dt_gui_main_window(), DT_PIXEL_APPLY_DPI, FALSE, IS_NULL_PTR, k, main(), and TRUE.
Referenced by dt_drawlayer_wait_for_rasterization_modal().
|
static |
Definition at line 1409 of file drawlayer.c.
References dt_drawlayer_conf_brush_shape(), dt_drawlayer_conf_hardness(), dt_drawlayer_conf_opacity(), dt_drawlayer_conf_sprinkle_coarseness(), dt_drawlayer_conf_sprinkle_size(), dt_drawlayer_conf_sprinkles(), dt_drawlayer_widgets_set_brush_profile_preview(), dt_iop_gui_data(), g, and IS_NULL_PTR.
Referenced by _brush_profile_button_press(), _widget_changed(), and gui_update().
|
static |
Definition at line 1738 of file drawlayer.c.
References dt_bauhaus_combobox_length(), dt_drawlayer_layer_name_non_empty(), dt_iop_gui_data(), g, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_module_t::params, params, and TRUE.
Referenced by _layer_selected(), and dt_drawlayer_refresh_layer_widgets().
|
static |
Definition at line 1911 of file drawlayer.c.
References _brush_paints_color(), DT_DRAWLAYER_BRUSH_SHAPE_GAUSSIAN, dt_drawlayer_conf_brush_shape(), dt_iop_gui_data(), g, and IS_NULL_PTR.
Referenced by _brush_profile_button_press(), _widget_changed(), gui_reset(), and gui_update().
|
static |
Definition at line 1785 of file drawlayer.c.
References DRAWLAYER_PREVIEW_BG_BLACK, DRAWLAYER_PREVIEW_BG_GREY, DRAWLAYER_PREVIEW_BG_IMAGE, DRAWLAYER_PREVIEW_BG_WHITE, dt_iop_gui_data(), g, and IS_NULL_PTR.
Referenced by _preview_bg_toggled(), and gui_update().
|
static |
Definition at line 2703 of file drawlayer.c.
References dt_drawlayer_runtime_manager_update(), g, IS_NULL_PTR, 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 _apply_selected_layer_attachment(), _brush_profile_button_press(), _clear_current_layer(), _create_new_layer(), _develop_ui_pipe_finished_callback(), _fill_current_layer(), _widget_changed(), change_image(), gui_cleanup(), gui_focus(), gui_init(), gui_reset(), gui_update(), mouse_leave(), mouse_moved(), and scrolled().
Definition at line 2307 of file drawlayer.c.
References _sync_brush_profile_preview_widget(), _sync_mode_sensitive_widgets(), _update_gui_runtime_manager(), dt_drawlayer_conf_sync_params_from_gui(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SYNC_TEMP_BUFFERS, dt_drawlayer_sync_cached_brush_colors(), dt_drawlayer_widgets_get_display_color(), dt_gui_get_global(), dt_gui_widgets_suppressed(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, and TRUE.
Referenced by _build_brush_tab(), and _build_input_tab().
|
static |
Definition at line 1446 of file drawlayer.c.
References _clamp01(), dt_iop_module_t::dev, dt_drawlayer_conf_hdr_exposure(), dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_pipe_output_profile_info(), dt_ioppr_transform_image_colorspace_rgb(), FALSE, dt_develop_t::iop, IS_NULL_PTR, out, pipe, and TRUE.
Referenced by color_picker_apply().
| 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).
Definition at line 3726 of file drawlayer.c.
References _clamp01(), _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_mouse_is_painting(), dt_control_queue_redraw_center(), dt_drawlayer_layer_name_non_empty(), 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_gui_data(), dt_iop_request_focus(), dt_drawlayer_runtime_update_request_t::event, g, dt_develop_t::gui_module, dt_control_pointer_input_t::has_pressure, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_drawlayer_runtime_result_t::ok, dt_iop_module_t::params, 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, TRUE, 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).
Definition at line 3788 of file drawlayer.c.
References _clamp01(), _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_iop_gui_data(), dt_drawlayer_runtime_update_request_t::event, g, dt_control_pointer_input_t::has_pressure, IS_NULL_PTR, 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, 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.
Definition at line 3346 of file drawlayer.c.
References _update_gui_runtime_manager(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_CHANGE_IMAGE, dt_iop_gui_data(), FALSE, and g.
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Release global OpenCL resources for drawlayer.
Definition at line 2790 of file drawlayer.c.
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_kernel(), IS_NULL_PTR, and dt_iop_drawlayer_global_data_t::kernel_premult_over.
| 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.
Definition at line 2849 of file drawlayer.c.
References dt_drawlayer_process_state_cleanup(), dt_drawlayer_runtime_manager_cleanup(), dt_free_align, dt_iop_drawlayer_data_t::headless_manager, IS_NULL_PTR, piece, pipe, dt_iop_drawlayer_data_t::process, and void().
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Apply selected picker color to drawlayer brush color.
Definition at line 1496 of file drawlayer.c.
References _working_rgb_to_display_rgb(), DRAWLAYER_PICK_SOURCE_OUTPUT, dt_drawlayer_conf_apply_display_brush_color(), dt_drawlayer_conf_pick_source(), dt_gui_widgets_suppressed(), IS_NULL_PTR, 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, piece, pipe, 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.
Definition at line 2862 of file drawlayer.c.
References dt_iop_module_t::dev, dt_drawlayer_runtime_manager_bind_piece(), dt_drawlayer_sanitize_params(), dt_iop_gui_data(), g, dt_iop_drawlayer_data_t::headless_manager, params, dt_iop_drawlayer_data_t::params, piece, dt_develop_t::pipe, 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, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Return default colorspace expected by drawlayer process paths.
Definition at line 2813 of file drawlayer.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Return default iop group for drawlayer module.
Definition at line 2801 of file drawlayer.c.
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Module description strings used by UI/help.
Definition at line 2766 of file drawlayer.c.
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 | ||
| ) |
Definition at line 2669 of file drawlayer.c.
References dt_drawlayer_worker_active(), dt_drawlayer_worker_reset_backend_path(), dt_drawlayer_worker_reset_live_publish(), dt_drawlayer_worker_snapshot_params(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_drawlayer_paint_raw_input_t::event_index, FALSE, g, IS_NULL_PTR, dt_iop_module_t::params, dt_drawlayer_paint_raw_input_t::stroke_batch, and TRUE.
Referenced by dt_drawlayer_runtime_manager_update().
| gboolean dt_drawlayer_commit_dabs | ( | dt_iop_module_t * | self, |
| gboolean | record_history | ||
| ) |
Definition at line 1804 of file drawlayer.c.
References _retain_base_patch_stroke_ref(), dt_iop_module_t::dev, dt_control_queue_redraw_center(), DT_DEBUG_PERF, 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_layers_reset_stroke_session(), dt_drawlayer_set_pipeline_realtime_mode(), dt_drawlayer_touch_stroke_commit_hash(), dt_drawlayer_worker_cancel_async_commit(), dt_drawlayer_worker_publish_backend_stroke_damage(), dt_drawlayer_worker_request_commit(), dt_drawlayer_worker_reset_stroke(), dt_drawlayer_worker_seal_for_commit(), dt_drawlayer_worker_wait_idle(), dt_iop_gui_data(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_print(), dt_pthread_rwlock_unlock(), dt_pthread_rwlock_wrlock(), FALSE, g, dt_develop_t::gui_attached, dt_develop_t::history_mutex, dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, dt_iop_module_t::params, params, and TRUE.
Referenced by _clear_current_layer(), _commit_dabs_on_gui_thread(), _create_background_layer_from_input(), _create_new_layer(), _delete_layer_clicked(), _fill_current_layer(), _perform_runtime_commit_sequence(), _rename_current_layer_from_gui(), _save_layer_clicked(), gui_reset(), and module_will_remove().
| gboolean dt_drawlayer_current_work_profile_key | ( | dt_iop_module_t * | self, |
| GList * | iop_list, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| char * | key, | ||
| const size_t | key_size | ||
| ) |
Definition at line 354 of file drawlayer.c.
References dt_ioppr_get_iop_work_profile_info(), FALSE, dt_iop_order_iccprofile_info_t::filename, dt_iop_order_iccprofile_info_t::intent, IS_NULL_PTR, key, pipe, and dt_iop_order_iccprofile_info_t::type.
Referenced by dt_drawlayer_ensure_layer_cache(), and dt_drawlayer_sanitize_params().
| void dt_drawlayer_end_gui_stroke_capture | ( | dt_iop_module_t * | self | ) |
Definition at line 2697 of file drawlayer.c.
References dt_iop_gui_data(), g, and IS_NULL_PTR.
Referenced by dt_drawlayer_runtime_manager_update().
| gboolean dt_drawlayer_flush_layer_cache | ( | dt_iop_module_t * | self | ) |
Definition at line 364 of file layers.c.
References 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_layer_name_non_empty(), dt_drawlayer_paint_runtime_state_reset(), dt_drawlayer_rekey_shared_base_patch(), dt_drawlayer_release_all_base_patch_extra_refs(), dt_drawlayer_sidecar_timestamp_from_path(), dt_drawlayer_worker_any_active(), dt_drawlayer_worker_wait_idle(), dt_iop_gui_data(), DT_PATH_MAX, FALSE, g, dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, dt_iop_module_t::params, params, dt_iop_drawlayer_params_t::sidecar_timestamp, TRUE, dt_drawlayer_io_patch_t::width, dt_iop_drawlayer_params_t::work_profile, and dt_drawlayer_io_patch_t::x.
Referenced by _create_background_layer_from_input(), _create_new_layer(), _rename_current_layer_from_gui(), _save_layer_clicked(), dt_drawlayer_runtime_manager_update(), and module_will_remove().
| void dt_drawlayer_invalidate_brush_settings_cache | ( | dt_iop_drawlayer_gui_data_t * | g | ) |
Definition at line 243 of file drawlayer.c.
References FALSE, g, and IS_NULL_PTR.
Referenced by dt_drawlayer_conf_apply_display_brush_color(), dt_drawlayer_conf_sync_params_from_gui(), gui_update(), and scrolled().
| gboolean dt_drawlayer_layer_name_non_empty | ( | const char * | name | ) |
Definition at line 345 of file drawlayer.c.
References DRAWLAYER_NAME_SIZE, FALSE, IS_NULL_PTR, and name().
Referenced by _apply_selected_layer_attachment(), _attach_selected_layer_clicked(), _confirm_delete_layer(), _create_background_layer_from_input(), _delete_current_layer(), _layer_selected(), _prompt_layer_name_dialog(), _rename_current_layer_from_gui(), _rename_layer_clicked(), _save_layer_clicked(), _sync_layer_controls(), button_pressed(), dt_drawlayer_ensure_layer_cache(), dt_drawlayer_flush_layer_cache(), dt_drawlayer_layers_populate_list(), and dt_drawlayer_sanitize_params().
| void dt_drawlayer_refresh_layer_widgets | ( | dt_iop_module_t * | self | ) |
Definition at line 1727 of file drawlayer.c.
References _sync_layer_controls(), dt_drawlayer_layers_populate_list(), dt_iop_gui_data(), g, IS_NULL_PTR, dt_iop_module_t::params, and params.
Referenced by _apply_selected_layer_attachment(), _background_layer_job_done_idle(), _create_new_layer(), _delete_current_layer(), _delete_layer_clicked(), _rename_current_layer_from_gui(), _save_layer_clicked(), dt_drawlayer_ensure_layer_cache(), gui_reset(), and gui_update().
| gboolean dt_drawlayer_rekey_shared_base_patch | ( | drawlayer_patch_t * | patch, |
| const int32_t | imgid, | ||
| const dt_iop_drawlayer_params_t * | params | ||
| ) |
Definition at line 404 of file drawlayer.c.
References dt_drawlayer_cache_patch_t::cache_entry, dt_drawlayer_cache_patch_t::cache_hash, 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_get_debug_flags(), dt_print(), FALSE, dt_drawlayer_cache_patch_t::height, IS_NULL_PTR, params, dt_drawlayer_cache_patch_t::pixels, TRUE, and dt_drawlayer_cache_patch_t::width.
Referenced by _save_layer_clicked(), and dt_drawlayer_flush_layer_cache().
| void dt_drawlayer_release_all_base_patch_extra_refs | ( | dt_iop_drawlayer_gui_data_t * | g | ) |
Definition at line 466 of file drawlayer.c.
References dt_dev_pixelpipe_cache_ref_count_entry(), FALSE, g, and IS_NULL_PTR.
Referenced by _delete_current_layer(), _save_layer_clicked(), dt_drawlayer_ensure_layer_cache(), dt_drawlayer_flush_layer_cache(), dt_drawlayer_runtime_manager_update(), and gui_cleanup().
| void dt_drawlayer_retain_base_patch_loaded_ref | ( | dt_iop_drawlayer_gui_data_t * | g | ) |
Definition at line 452 of file drawlayer.c.
References dt_dev_pixelpipe_cache_ref_count_entry(), g, IS_NULL_PTR, and TRUE.
Referenced by dt_drawlayer_ensure_layer_cache().
| void dt_drawlayer_sanitize_params | ( | dt_iop_module_t * | self, |
| dt_iop_drawlayer_params_t * | params | ||
| ) |
Definition at line 1546 of file drawlayer.c.
References _profile_key_is_sane(), _sanitize_requested_layer_name(), dt_iop_module_t::dev, DRAWLAYER_NAME_SIZE, DRAWLAYER_PROFILE_SIZE, dt_drawlayer_current_work_profile_key(), dt_drawlayer_layer_name_non_empty(), dt_develop_t::iop, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, params, dt_develop_t::pipe, dt_iop_drawlayer_params_t::sidecar_timestamp, dt_iop_drawlayer_params_t::stroke_commit_hash, and dt_iop_drawlayer_params_t::work_profile.
Referenced by commit_params(), dt_drawlayer_ensure_layer_cache(), gui_init(), and gui_update().
| void dt_drawlayer_set_pipeline_realtime_mode | ( | dt_iop_module_t * | self, |
| gboolean | state | ||
| ) |
Definition at line 456 of file layers.c.
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_transient_params_clear(), IS_NULL_PTR, dt_dev_pixelpipe_t::pause, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_dev_pixelpipe_t::shutdown, state, and TRUE.
Referenced by _perform_runtime_commit_sequence(), dt_drawlayer_commit_dabs(), 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 | ||
| ) |
Definition at line 2736 of file drawlayer.c.
References DT_DRAWLAYER_RUNTIME_FEEDBACK_FOCUS_LOSS_WAIT, DT_DRAWLAYER_RUNTIME_FEEDBACK_NONE, DT_DRAWLAYER_RUNTIME_FEEDBACK_SAVE_WAIT, dt_drawlayer_wait_for_rasterization_modal(), g, and IS_NULL_PTR.
Referenced by dt_drawlayer_runtime_manager_update().
| int64_t dt_drawlayer_sidecar_timestamp_from_path | ( | const char * | path | ) |
Definition at line 1169 of file drawlayer.c.
References IS_NULL_PTR.
Referenced by _rename_current_layer_from_gui(), dt_drawlayer_ensure_layer_cache(), and dt_drawlayer_flush_layer_cache().
| void dt_drawlayer_sync_cached_brush_colors | ( | dt_iop_module_t * | self, |
| const float | display_rgb[3] | ||
| ) |
Cache brush colors in GUI state so stroke input snapshots don't re-transform per event.
Cache the brush colours in GUI state so a stroke's input snapshots do not re-transform them per event.
Definition at line 185 of file drawlayer.c.
References _brush_pipeline_color_from_display(), _clamp01(), dt_iop_gui_data(), g, IS_NULL_PTR, and TRUE.
Referenced by _fill_input_brush_settings(), _widget_changed(), dt_drawlayer_conf_apply_display_brush_color(), dt_drawlayer_conf_sync_color_picker(), and gui_update().
| gboolean dt_drawlayer_sync_widget_cache | ( | dt_iop_module_t * | self | ) |
Definition at line 474 of file layers.c.
References _ensure_widget_cache(), dt_iop_module_t::dev, dt_drawlayer_current_live_padding(), dt_drawlayer_worker_pause(), dt_drawlayer_worker_resume(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, 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 | ||
| ) |
Definition at line 1703 of file drawlayer.c.
References dt_hash(), hash, IS_NULL_PTR, params, and dt_iop_drawlayer_params_t::stroke_commit_hash.
Referenced by _apply_selected_layer_attachment(), _clear_current_layer(), _create_new_layer(), _delete_layer_clicked(), _fill_current_layer(), _preview_bg_toggled(), _publish_backend_progress(), dt_drawlayer_commit_dabs(), gui_focus(), and gui_reset().
| void dt_drawlayer_wait_for_rasterization_modal | ( | const dt_iop_drawlayer_gui_data_t * | g, |
| const char * | title, | ||
| const char * | message | ||
| ) |
Definition at line 1293 of file drawlayer.c.
References _drawlayer_modal_wait_tick(), _show_drawlayer_wait_dialog(), drawlayer_wait_dialog_t::dialog, dt_drawlayer_worker_any_active(), FALSE, g, drawlayer_modal_wait_state_t::loop, and state.
Referenced by _save_layer_clicked(), and dt_drawlayer_show_runtime_feedback().
| int flags | ( | ) |
Return module capability flags.
Definition at line 2807 of file drawlayer.c.
References IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_cleanup | ( | dt_iop_module_t * | self | ) |
Definition at line 3405 of file drawlayer.c.
References _develop_ui_pipe_finished_callback(), _update_gui_runtime_manager(), dt_control_set_cursor_visible, dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_drawlayer_process_state_cleanup(), dt_drawlayer_release_all_base_patch_extra_refs(), 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(), dt_iop_gui_data(), FALSE, g, IOP_GUI_FREE, IS_NULL_PTR, and TRUE.
| void gui_focus | ( | dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
Focus transition hook (enter/leave) for drawlayer GUI mode.
Definition at line 3357 of file drawlayer.c.
References _update_gui_runtime_manager(), dt_iop_module_t::dev, dt_control_set_cursor_visible, 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_touch_stroke_commit_hash(), dt_iop_gui_data(), dt_pthread_rwlock_unlock(), dt_pthread_rwlock_wrlock(), FALSE, g, dt_develop_t::history_mutex, dt_image_t::id, dt_develop_t::image_storage, IS_NULL_PTR, dt_iop_module_t::params, params, and TRUE.
| void gui_init | ( | dt_iop_module_t * | self | ) |
Build GUI widgets and initialize worker/caches.
Definition at line 3195 of file drawlayer.c.
References _build_brush_tab(), _build_input_tab(), _build_layer_tab(), _develop_ui_pipe_finished_callback(), _save_layer_clicked(), _update_gui_runtime_manager(), dt_iop_module_t::dev, dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_dev_viewport_center_x(), dt_dev_viewport_center_y(), dt_dev_viewport_scaling(), dt_drawlayer_conf_ensure_defaults(), dt_drawlayer_conf_load_color_history(), dt_drawlayer_process_state_init(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_RESYNC, dt_drawlayer_runtime_manager_init(), dt_drawlayer_sanitize_params(), dt_drawlayer_widgets_init(), dt_drawlayer_worker_init(), DT_GUI_BOX_SPACING, dt_iop_gui_data(), DT_SIGNAL_DEVELOP_UI_PIPE_FINISHED, dt_ui_notebook_set_picker_owner(), FALSE, g, dt_iop_module_t::gui, IOP_GUI_ALLOC, notebook, dt_iop_module_t::params, params, dt_iop_module_gui_t::reset_button, TRUE, and dt_iop_module_gui_t::widget.
| 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).
Definition at line 3528 of file drawlayer.c.
References _brush_paints_color(), _compute_hud_brush_state(), _draw_brush_hud(), _ensure_cursor_stamp_surface(), dt_iop_module_t::dev, dt_control_get_pointer_input(), dt_dev_get_overlay_scale(), dt_drawlayer_layer_to_widget_coords(), dt_drawlayer_widget_brush_radius(), dt_drawlayer_widget_to_layer_coords(), dt_iop_gui_data(), g, dt_develop_t::gui_module, drawlayer_hud_brush_state_t::hardness, IS_NULL_PTR, 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.
Definition at line 2883 of file drawlayer.c.
References _confirm_delete_layer(), _sync_mode_sensitive_widgets(), _update_gui_runtime_manager(), dt_iop_module_t::dev, dt_drawlayer_commit_dabs(), dt_drawlayer_refresh_layer_widgets(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_RESYNC, dt_drawlayer_touch_stroke_commit_hash(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, dt_iop_module_t::params, params, dt_iop_drawlayer_params_t::sidecar_timestamp, and dt_iop_drawlayer_params_t::work_profile.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
Definition at line 3269 of file drawlayer.c.
References _sync_brush_profile_preview_widget(), _sync_mode_sensitive_widgets(), _sync_preview_bg_buttons(), _update_gui_runtime_manager(), dt_iop_module_t::dev, dt_bauhaus_combobox_set(), dt_bauhaus_slider_set(), dt_conf_get_bool(), dt_drawlayer_conf_brush_mode(), dt_drawlayer_conf_distance(), dt_drawlayer_conf_flow(), dt_drawlayer_conf_hardness(), dt_drawlayer_conf_hdr_exposure(), dt_drawlayer_conf_mapping_profile(), dt_drawlayer_conf_opacity(), dt_drawlayer_conf_pick_source(), dt_drawlayer_conf_size(), dt_drawlayer_conf_smoothing(), dt_drawlayer_conf_sprinkle_coarseness(), dt_drawlayer_conf_sprinkle_size(), dt_drawlayer_conf_sprinkles(), dt_drawlayer_conf_sync_color_picker(), dt_drawlayer_invalidate_brush_settings_cache(), dt_drawlayer_mapping_rows(), DT_DRAWLAYER_MAPPING_ROWS, DT_DRAWLAYER_MAPPING_TARGETS, dt_drawlayer_refresh_layer_widgets(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_RESYNC, dt_drawlayer_sanitize_params(), dt_drawlayer_sync_cached_brush_colors(), dt_drawlayer_widgets_get_display_color(), dt_gui_widget_freeze, dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, dt_iop_module_t::params, params, r, dt_drawlayer_mapping_row_t::targets, and dt_drawlayer_mapping_cell_t::widget.
Referenced by _apply_selected_layer_attachment(), _create_new_layer(), and _delete_layer_clicked().
| void init | ( | dt_iop_module_t * | module | ) |
Allocate and initialize module parameter blocks.
Definition at line 2819 of file drawlayer.c.
References dt_iop_module_t::default_params, and dt_iop_module_t::params.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Initialize global OpenCL resources for drawlayer kernels.
Definition at line 2775 of file drawlayer.c.
References dt_opencl_create_kernel(), IS_NULL_PTR, and dt_iop_drawlayer_global_data_t::kernel_premult_over.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 2829 of file drawlayer.c.
References dt_calloc_align(), dt_drawlayer_process_state_init(), dt_drawlayer_runtime_manager_bind_piece(), dt_drawlayer_runtime_manager_init(), FALSE, dt_iop_drawlayer_data_t::headless_manager, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_order, dt_iop_drawlayer_data_t::params, piece, 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.
Definition at line 2907 of file drawlayer.c.
References _confirm_delete_layer(), dt_iop_module_t::dev, dt_drawlayer_commit_dabs(), dt_drawlayer_flush_layer_cache(), FALSE, IS_NULL_PTR, and TRUE.
| int mouse_leave | ( | dt_iop_module_t * | self | ) |
Mouse leave handler.
Definition at line 3613 of file drawlayer.c.
References _update_gui_runtime_manager(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_MOUSE_LEAVE, dt_iop_gui_data(), FALSE, g, and IS_NULL_PTR.
| int mouse_moved | ( | dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
Mouse motion handler.
Definition at line 3622 of file drawlayer.c.
References _build_raw_input_event(), _update_gui_runtime_manager(), dt_iop_module_t::dev, DT_DEBUG_PERF, 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_SAMPLE, dt_gui_center_widget(), dt_iop_gui_data(), dt_print(), DT_REQUEST_COLORPICK_OFF, dt_drawlayer_runtime_update_request_t::event, FALSE, g, IS_NULL_PTR, 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_drawlayer_runtime_host_t::user_data, and x.
| const char * name | ( | ) |
Module display name.
Definition at line 2760 of file drawlayer.c.
Referenced by _prompt_layer_name_dialog(), _sanitize_requested_layer_name(), and dt_drawlayer_layer_name_non_empty().
| __DT_CLONE_TARGETS__ int process | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid | ||
| ) |
CPU processing path for layer-over-input compositing.
Definition at line 4077 of file drawlayer.c.
References _blend_layer_over_input(), _get_process_scratch(), _process_bind_runtime(), DT_DEBUG_PERF, DT_DEBUG_VERBOSE, dt_drawlayer_cache_ensure_scratch_buffer(), DT_DRAWLAYER_RUNTIME_EVENT_PROCESS_CPU_AFTER, DT_DRAWLAYER_RUNTIME_EVENT_PROCESS_CPU_BEFORE, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, dt_get_debug_flags(), DT_INTERPOLATION_BILINEAR, dt_interpolation_new(), dt_interpolation_resample(), dt_iop_gui_data(), dt_iop_image_copy_by_size(), dt_print(), drawlayer_preview_background_t::enabled, dt_drawlayer_runtime_update_request_t::event, FALSE, dt_iop_roi_t::height, IS_NULL_PTR, dt_iop_drawlayer_params_t::layer_name, drawlayer_process_scratch_t::layerbuf, drawlayer_process_scratch_t::layerbuf_pixels, dt_drawlayer_runtime_request_t::manager, ovoid, dt_iop_drawlayer_data_t::params, piece, pipe, dt_drawlayer_runtime_source_t::pixels, dt_drawlayer_runtime_release_t::process, dt_drawlayer_runtime_request_t::process_state, dt_drawlayer_runtime_update_request_t::release, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_source_t::source_roi, dt_drawlayer_runtime_source_t::target_roi, TRUE, dt_drawlayer_runtime_host_t::user_data, drawlayer_preview_background_t::value, and dt_iop_roi_t::width.
Referenced by _drawlayer_acquire_source_image().
| int process_cl | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| cl_mem | dev_in, | ||
| cl_mem | dev_out | ||
| ) |
OpenCL processing path for layer-over-input compositing.
Definition at line 3921 of file drawlayer.c.
References _blend_layer_over_input_cl(), _get_process_scratch(), _process_bind_runtime(), dt_drawlayer_process_state_t::base_patch, dt_dev_pixelpipe_t::bypass_cache, dt_drawlayer_runtime_source_t::cache_entry, dt_drawlayer_cache_patch_t::cache_hash, dt_dev_pixelpipe_t::devid, drawlayer_blend_cl_request_t::devid, DT_DEBUG_PERF, DT_DEBUG_VERBOSE, dt_dev_pixelpipe_get_realtime(), DT_DRAWLAYER_RUNTIME_EVENT_PROCESS_CL_AFTER, DT_DRAWLAYER_RUNTIME_EVENT_PROCESS_CL_BEFORE, dt_drawlayer_runtime_manager_update(), DT_DRAWLAYER_RUNTIME_RAW_INPUT_NONE, dt_get_debug_flags(), dt_iop_clip_and_zoom_roi_cl(), dt_iop_gui_data(), dt_print(), drawlayer_preview_background_t::enabled, dt_drawlayer_runtime_update_request_t::event, FALSE, dt_iop_module_t::global_data, dt_drawlayer_runtime_source_t::height, IS_NULL_PTR, dt_iop_drawlayer_global_data_t::kernel_premult_over, dt_drawlayer_process_state_t::last_composite_dev_out, dt_drawlayer_process_state_t::last_composite_layer_hash, dt_drawlayer_process_state_t::last_composite_target_roi, dt_drawlayer_process_state_t::last_composite_valid, dt_iop_drawlayer_params_t::layer_name, dt_drawlayer_runtime_request_t::manager, dt_iop_drawlayer_data_t::params, piece, pipe, dt_drawlayer_runtime_source_t::pixels, dt_drawlayer_runtime_release_t::process, dt_drawlayer_runtime_request_t::process_state, dt_drawlayer_runtime_update_request_t::release, dt_drawlayer_runtime_context_t::runtime, dt_drawlayer_runtime_source_t::source_roi, dt_drawlayer_runtime_source_t::target_roi, TRUE, dt_drawlayer_runtime_host_t::user_data, drawlayer_preview_background_t::value, and dt_drawlayer_runtime_source_t::width.
| void quiesce | ( | dt_iop_module_t * | self | ) |
Destroy GUI resources and stop background worker.
Definition at line 3392 of file drawlayer.c.
References dt_drawlayer_worker_stop(), dt_iop_gui_data(), g, and IS_NULL_PTR.
| int scrolled | ( | dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | up, | ||
| uint32_t | state | ||
| ) |
Scroll handler used for interactive brush-size changes.
Definition at line 3841 of file drawlayer.c.
References _update_gui_runtime_manager(), dt_iop_module_t::dev, DRAWLAYER_CONF_SIZE, dt_bauhaus_slider_set(), dt_conf_set_float(), dt_drawlayer_conf_size(), dt_drawlayer_invalidate_brush_settings_cache(), DT_DRAWLAYER_RUNTIME_EVENT_GUI_SCROLL, dt_iop_gui_data(), dt_mask_scroll_increases(), dt_masks_get_visible_form(), factor, FALSE, dt_develop_t::form_gui, g, dt_develop_t::gui_module, and IS_NULL_PTR.
|
static |
Definition at line 386 of file drawlayer.c.
Referenced by _get_process_scratch().