![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Private drawlayer layer cache, sidecar sync and widget cache state. More...
#include "iop/drawlayer/layers.h"#include "iop/drawlayer/cache.h"#include "iop/drawlayer/io.h"#include "iop/drawlayer/runtime.h"#include "iop/drawlayer/worker.h"#include "control/user_message.h"#include "develop/develop.h"#include "develop/dev_history.h"#include "develop/imageop_gui.h"#include "develop/pixelpipe_hb.h"#include "widgets/bauhaus.h"#include "widgets/widget_settings.h"
Include dependency graph for layers.c:Go to the source code of this file.
Data Structures | |
| struct | drawlayer_layer_cache_key_t |
Typedefs | |
| typedef struct drawlayer_layer_cache_key_t | drawlayer_layer_cache_key_t |
Functions | |
| void | dt_drawlayer_layers_append_error (GString *errors, const char *message) |
| void | dt_drawlayer_layers_log_errors (GString *errors) |
| void | dt_drawlayer_layers_populate_list (dt_iop_module_t *self) |
| void | dt_drawlayer_layers_reset_stroke_session (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) |
| gboolean | dt_drawlayer_flush_layer_cache (dt_iop_module_t *self) |
| static gboolean | _ensure_widget_cache (dt_iop_module_t *self) |
| void | dt_drawlayer_set_pipeline_realtime_mode (dt_iop_module_t *self, const gboolean state) |
| gboolean | dt_drawlayer_sync_widget_cache (dt_iop_module_t *self) |
Private drawlayer layer cache, sidecar sync and widget cache state.
Cache ownership, worker synchronisation and the GUI side effects are the point of this file: what it publishes to drawlayer.c is in layers.h, and what drawlayer.c publishes back to it is in common.h. Both lists are short, and being short is what makes them worth reading – this used to be a text #include with no list at all.
Definition in file layers.c.
| typedef struct drawlayer_layer_cache_key_t drawlayer_layer_cache_key_t |
|
static |
Definition at line 409 of file layers.c.
References dt_iop_module_t::dev, dt_dev_viewport_center_x(), dt_dev_viewport_center_y(), dt_dev_viewport_scaling(), dt_drawlayer_compute_view_patch(), dt_drawlayer_layer_bounds_to_widget_bounds(), dt_drawlayer_worker_reset_backend_path(), dt_iop_gui_data(), FALSE, g, IS_NULL_PTR, TRUE, dt_drawlayer_damaged_rect_t::valid, and view.
Referenced by dt_drawlayer_sync_widget_cache().
|
static |
Definition at line 105 of file layers.c.
References FALSE, g, IS_NULL_PTR, key, and TRUE.
Referenced by dt_drawlayer_ensure_layer_cache().
| gboolean dt_drawlayer_ensure_layer_cache | ( | dt_iop_module_t * | self | ) |
Definition at line 131 of file layers.c.
References _layer_cache_matches(), dt_drawlayer_io_layer_info_t::count, drawlayer_dir_info_t::count, dt_iop_module_t::dev, DRAWLAYER_PROFILE_SIZE, dt_dev_geometry_snapshot(), dt_drawlayer_cache_clear_transparent_float(), dt_drawlayer_cache_ensure_mask_buffer(), dt_drawlayer_cache_patch_alloc_shared(), dt_drawlayer_cache_patch_clear(), dt_drawlayer_cache_patch_wrlock(), dt_drawlayer_cache_patch_wrunlock(), dt_drawlayer_current_work_profile_key(), dt_drawlayer_flush_layer_cache(), dt_drawlayer_io_find_layer(), dt_drawlayer_io_load_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_populate_list(), dt_drawlayer_layers_reset_stroke_session(), dt_drawlayer_paint_runtime_state_reset(), dt_drawlayer_process_state_invalidate(), dt_drawlayer_refresh_layer_widgets(), dt_drawlayer_release_all_base_patch_extra_refs(), dt_drawlayer_retain_base_patch_loaded_ref(), dt_drawlayer_sanitize_params(), dt_drawlayer_sidecar_timestamp_from_path(), dt_iop_gui_data(), DT_PATH_MAX, FALSE, dt_drawlayer_io_layer_info_t::found, drawlayer_dir_info_t::found, g, geometry, dt_drawlayer_io_layer_info_t::height, drawlayer_dir_info_t::height, dt_image_t::id, dt_develop_t::image_storage, drawlayer_layer_cache_key_t::imgid, dt_drawlayer_io_layer_info_t::index, drawlayer_dir_info_t::index, dt_develop_t::iop, IS_NULL_PTR, layer_height, dt_iop_drawlayer_params_t::layer_name, dt_iop_drawlayer_params_t::layer_order, layer_width, dt_drawlayer_io_layer_info_t::name, drawlayer_dir_info_t::name, dt_iop_module_t::params, params, dt_develop_t::pipe, dt_iop_drawlayer_params_t::sidecar_timestamp, 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, drawlayer_dir_info_t::work_profile, and dt_drawlayer_io_patch_t::x.
Referenced by _create_background_layer_from_input(), _perform_runtime_widget_cache_sync(), and 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_ensure_layer_cache(), dt_drawlayer_runtime_manager_update(), and module_will_remove().
| void dt_drawlayer_layers_append_error | ( | GString * | errors, |
| const char * | message | ||
| ) |
Definition at line 35 of file layers.c.
References IS_NULL_PTR.
Referenced by _delete_current_layer(), _rename_current_layer_from_gui(), and dt_drawlayer_ensure_layer_cache().
| void dt_drawlayer_layers_log_errors | ( | GString * | errors | ) |
Definition at line 42 of file layers.c.
References dt_control_log(), and IS_NULL_PTR.
Referenced by _delete_current_layer(), _rename_current_layer_from_gui(), and dt_drawlayer_ensure_layer_cache().
| void dt_drawlayer_layers_populate_list | ( | dt_iop_module_t * | self | ) |
Definition at line 48 of file layers.c.
References 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(), dt_drawlayer_layer_name_non_empty(), dt_gui_widget_freeze, dt_iop_gui_data(), DT_PATH_MAX, g, i, 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, names, dt_iop_module_t::params, and params.
Referenced by dt_drawlayer_ensure_layer_cache(), and dt_drawlayer_refresh_layer_widgets().
| void dt_drawlayer_layers_reset_stroke_session | ( | dt_iop_drawlayer_gui_data_t * | g | ) |
Definition at line 94 of file layers.c.
References dt_drawlayer_process_state_reset_stroke(), dt_drawlayer_worker_reset_backend_path(), dt_drawlayer_worker_reset_live_publish(), FALSE, g, and IS_NULL_PTR.
Referenced by _clear_current_layer(), _delete_current_layer(), _fill_current_layer(), dt_drawlayer_commit_dabs(), and dt_drawlayer_ensure_layer_cache().
| void dt_drawlayer_set_pipeline_realtime_mode | ( | dt_iop_module_t * | self, |
| const 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().
| 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().