![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "develop/dev_snapshot.h"#include "develop/iop_order.h"#include "caches/mipmap_cache.h"#include "control/control.h"#include "control/jobs.h"#include "develop/dev_history.h"#include "develop/develop.h"#include "develop/masks/masks_history.h"#include "develop/pixelpipe_hb.h"#include "views/dev_backbuf.h"#include <math.h>#include "gui/application.h"
Include dependency graph for dev_snapshot.c:Go to the source code of this file.
Data Structures | |
| struct | dt_dev_snapshot_engine_t |
Typedefs | |
| typedef struct dt_dev_snapshot_engine_t | dt_dev_snapshot_engine_t |
| typedef struct dt_dev_snapshot_engine_t dt_dev_snapshot_engine_t |
|
static |
Definition at line 153 of file dev_snapshot.c.
References dt_dev_roi_request_natural_scale(), dt_dev_roi_request_valid(), dt_dev_viewport_box_height(), dt_dev_viewport_box_width(), dt_dev_viewport_center_x(), dt_dev_viewport_center_y(), dt_dev_viewport_scaling(), FALSE, dt_iop_roi_t::height, IS_NULL_PTR, MAX, MIN, dt_dev_pixelpipe_t::processed_height, dt_dev_pixelpipe_t::processed_width, dt_iop_roi_t::scale, TRUE, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by dt_dev_snapshot_capture(), and dt_dev_snapshot_draw().
|
static |
Definition at line 173 of file dev_snapshot.c.
References dt_dev_roi_request_natural_scale(), dt_dev_roi_request_valid(), FALSE, dt_iop_roi_t::height, IS_NULL_PTR, MAX, dt_dev_pixelpipe_t::processed_height, dt_dev_pixelpipe_t::processed_width, dt_iop_roi_t::scale, TRUE, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _sync_preview_now().
|
static |
Definition at line 313 of file dev_snapshot.c.
References dt_dev_lock_pipe_surface(), dt_dev_pixelpipe_cache_rdlock_entry(), dt_dev_viewport_center_x(), dt_dev_viewport_center_y(), dt_dev_viewport_scaling(), dt_gui_get_global(), dt_dev_locked_surface_t::entry, FALSE, height, dt_dev_locked_surface_t::height, IS_NULL_PTR, dt_gui_gtk_t::ppd, dt_dev_snapshot_engine_t::preview_locked, dt_dev_snapshot_engine_t::preview_pipe, dt_dev_snapshot_engine_t::preview_roi_valid, dt_dev_snapshot_engine_t::preview_wait, dt_dev_locked_surface_t::surface, TRUE, width, and dt_dev_locked_surface_t::width.
Referenced by dt_dev_snapshot_draw().
|
static |
Definition at line 84 of file dev_snapshot.c.
References dt_dev_cleanup(), dt_dev_pixelpipe_cleanup(), dt_dev_release_locked_surface(), dt_free, dt_pthread_mutex_destroy(), dt_dev_snapshot_engine_t::frozen, IS_NULL_PTR, dt_dev_snapshot_engine_t::lock, dt_dev_snapshot_engine_t::locked, dt_dev_snapshot_engine_t::pipe, dt_dev_snapshot_engine_t::preview_locked, and dt_dev_snapshot_engine_t::preview_pipe.
Referenced by _engine_unref().
|
static |
Definition at line 112 of file dev_snapshot.c.
References _engine_free(), dt_atomic_sub_int(), IS_NULL_PTR, and dt_dev_snapshot_engine_t::ref_count.
Referenced by _recompute_job_cleanup(), dt_dev_snapshot_capture(), and dt_dev_snapshot_clear().
|
static |
Definition at line 206 of file dev_snapshot.c.
References DT_DEV_PIPE_ZOOMED, dt_dev_pixelpipe_change(), dt_dev_pixelpipe_or_changed(), dt_dev_pixelpipe_process(), dt_dev_pixelpipe_set_input(), DT_MIPMAP_FULL, dt_dev_snapshot_engine_t::frozen, dt_image_t::id, dt_develop_t::image_storage, dt_dev_snapshot_engine_t::raw_height, dt_dev_snapshot_engine_t::raw_iscale, and dt_dev_snapshot_engine_t::raw_width.
Referenced by _recompute_job_run(), _sync_main_now(), and _sync_preview_now().
Definition at line 118 of file dev_snapshot.c.
References _engine_unref().
Referenced by _schedule_main_recompute().
|
static |
Definition at line 240 of file dev_snapshot.c.
References _process_at_roi(), dt_dev_snapshot_engine_t::destroying, dt_atomic_get_int(), dt_control_job_get_params(), dt_control_job_get_state(), dt_control_queue_redraw_center(), DT_JOB_STATE_CANCELLED, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), IS_NULL_PTR, dt_dev_snapshot_engine_t::job, dt_dev_snapshot_engine_t::last_roi, dt_dev_snapshot_engine_t::lock, dt_dev_snapshot_engine_t::pending_roi, dt_dev_snapshot_engine_t::pipe, and dt_dev_snapshot_engine_t::roi_valid.
Referenced by _schedule_main_recompute().
|
static |
Definition at line 188 of file dev_snapshot.c.
Referenced by _sync_preview_now(), and dt_dev_snapshot_draw().
|
static |
Definition at line 283 of file dev_snapshot.c.
References _recompute_job_cleanup(), _recompute_job_run(), dt_atomic_add_int(), dt_control_add_job(), dt_control_get_global(), dt_control_job_create(), dt_control_job_dispose(), dt_control_job_set_params(), DT_JOB_QUEUE_USER_FG, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), IS_NULL_PTR, dt_dev_snapshot_engine_t::job, dt_dev_snapshot_engine_t::lock, dt_dev_snapshot_engine_t::pending_roi, and dt_dev_snapshot_engine_t::ref_count.
Referenced by dt_dev_snapshot_draw().
|
static |
Definition at line 229 of file dev_snapshot.c.
References _process_at_roi(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_dev_snapshot_engine_t::last_roi, dt_dev_snapshot_engine_t::lock, dt_dev_snapshot_engine_t::pipe, and dt_dev_snapshot_engine_t::roi_valid.
Referenced by dt_dev_snapshot_capture().
|
static |
Definition at line 217 of file dev_snapshot.c.
References _compute_preview_roi(), _process_at_roi(), _roi_equal(), dt_dev_snapshot_engine_t::preview_last_roi, dt_dev_snapshot_engine_t::preview_pipe, and dt_dev_snapshot_engine_t::preview_roi_valid.
Referenced by dt_dev_snapshot_capture(), and dt_dev_snapshot_draw().
| gboolean dt_dev_snapshot_capture | ( | dt_dev_snapshot_t * | snap, |
| dt_develop_t * | dev, | ||
| int32_t | imgid, | ||
| GList * | history_override, | ||
| GList * | iop_order_override, | ||
| int32_t | history_end_override | ||
| ) |
Definition at line 341 of file dev_snapshot.c.
References _compute_main_roi(), _engine_unref(), _sync_main_now(), _sync_preview_now(), dt_mipmap_buffer_t::buf, dt_dev_snapshot_engine_t::captured, dt_dev_snapshot_engine_t::destroying, dt_atomic_set_int(), DT_DEBUG_DEV, dt_dev_cleanup(), dt_dev_create_module_instance(), dt_dev_get_global(), dt_dev_get_module_instance(), dt_dev_history_compute_hash(), dt_dev_history_free_history(), dt_dev_init(), dt_dev_load_image(), dt_dev_pixelpipe_cleanup(), dt_dev_pixelpipe_create_nodes(), dt_dev_pixelpipe_get_roi_out(), dt_dev_pixelpipe_init(), dt_dev_pixelpipe_propagate_formats(), dt_dev_pixelpipe_set_icc(), dt_dev_pixelpipe_set_input(), dt_dev_pixelpipe_synch_all, dt_dev_set_history_end_ext(), dt_dev_set_history_hash(), dt_dev_snapshot_clear(), dt_free, dt_free_gpointer(), dt_iop_get_module_by_op_priority(), dt_masks_replace_current_forms(), DT_MIPMAP_BLOCKING, dt_mipmap_cache_get, dt_mipmap_cache_release, DT_MIPMAP_FULL, dt_print(), dt_pthread_mutex_destroy(), dt_pthread_mutex_init(), dt_dev_snapshot_t::engine, FALSE, dt_dev_history_item_t::forms, dt_dev_snapshot_engine_t::frozen, dt_mipmap_buffer_t::height, dt_develop_t::history, i, dt_dev_pixelpipe_t::icc_filename, dt_dev_pixelpipe_t::icc_intent, dt_dev_pixelpipe_t::icc_type, dt_image_t::id, dt_develop_t::image_storage, dt_develop_t::iop, dt_develop_t::iop_order_list, IS_NULL_PTR, dt_mipmap_buffer_t::iscale, dt_dev_snapshot_engine_t::lock, dt_dev_history_item_t::multi_name, dt_dev_history_item_t::multi_priority, dt_dev_history_item_t::op_name, p, dt_dev_snapshot_engine_t::pipe, dt_dev_snapshot_engine_t::preview_pipe, dt_develop_t::preview_pipe, dt_dev_snapshot_engine_t::raw_height, dt_dev_snapshot_engine_t::raw_iscale, dt_dev_snapshot_engine_t::raw_width, dt_dev_snapshot_engine_t::ref_count, TRUE, and dt_mipmap_buffer_t::width.
Referenced by _lib_duplicate_thumb_press_callback(), and _lib_snapshot_capture_state().
| void dt_dev_snapshot_clear | ( | dt_dev_snapshot_t * | snap | ) |
Definition at line 123 of file dev_snapshot.c.
References _engine_unref(), dt_dev_snapshot_engine_t::destroying, dt_atomic_set_int(), dt_control_job_cancel(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_dev_snapshot_t::engine, IS_NULL_PTR, dt_dev_snapshot_engine_t::job, dt_dev_snapshot_engine_t::lock, and TRUE.
Referenced by _lib_duplicate_init_callback(), _lib_snapshot_clear_state(), _lib_snapshots_add_button_clicked_callback(), dt_dev_snapshot_capture(), gui_cleanup(), and view_leave().
| void dt_dev_snapshot_draw | ( | dt_dev_snapshot_t * | snap, |
| cairo_t * | cri, | ||
| struct dt_develop_t * | dev, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| double | clip_x, | ||
| double | clip_y, | ||
| double | clip_w, | ||
| double | clip_h | ||
| ) |
Definition at line 529 of file dev_snapshot.c.
References _compute_main_roi(), _draw_preview_fallback(), _roi_equal(), _schedule_main_recompute(), _sync_preview_now(), dt_dev_get_background_color(), dt_dev_lock_pipe_surface(), dt_dev_render_locked_surface(), dt_dev_viewport_border_size(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_dev_snapshot_t::engine, FALSE, height, IS_NULL_PTR, dt_dev_snapshot_engine_t::last_roi, dt_dev_snapshot_engine_t::lock, dt_dev_snapshot_engine_t::locked, dt_dev_snapshot_engine_t::pipe, dt_dev_snapshot_engine_t::preview_roi_valid, dt_dev_snapshot_engine_t::roi_valid, dt_dev_locked_surface_t::surface, dt_dev_snapshot_engine_t::wait, and width.
Referenced by gui_post_expose().
| gboolean dt_dev_snapshot_is_valid | ( | const dt_dev_snapshot_t * | snap | ) |
Definition at line 143 of file dev_snapshot.c.
References dt_dev_snapshot_engine_t::captured, dt_dev_snapshot_t::engine, and IS_NULL_PTR.
Referenced by _lib_snapshots_toggled_callback(), and gui_post_expose().