![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <inttypes.h>#include <stdint.h>#include <glib.h>
Include dependency graph for dev_pixelpipe.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_dev_pixelpipe_cache_wait_t |
Typedefs | |
| typedef void(* | dt_dev_pixelpipe_cache_ready_callback_t) (gpointer user_data) |
| typedef struct dt_dev_pixelpipe_cache_wait_t | dt_dev_pixelpipe_cache_wait_t |
| #define dt_dev_pixelpipe_rebuild_all | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_rebuild_all_real, (dev)) |
| #define dt_dev_pixelpipe_resync_history_all | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_resync_history_all_real, (dev)) |
| #define dt_dev_pixelpipe_resync_history_main | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_resync_history_main_real, (dev)) |
| #define dt_dev_pixelpipe_resync_history_preview | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_resync_history_preview_real, (dev)) |
| #define dt_dev_pixelpipe_update_history_all | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_update_history_all_real, (dev)) |
| #define dt_dev_pixelpipe_update_history_main | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_update_history_main_real, (dev)) |
| #define dt_dev_pixelpipe_update_history_preview | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_update_history_preview_real, (dev)) |
| #define dt_dev_pixelpipe_update_zoom_main | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_update_zoom_main_real, (dev)) |
| #define dt_dev_pixelpipe_update_zoom_preview | ( | dev | ) | DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_pixelpipe_update_zoom_preview_real, (dev)) |
| typedef void(* dt_dev_pixelpipe_cache_ready_callback_t) (gpointer user_data) |
| typedef struct dt_dev_pixelpipe_cache_wait_t dt_dev_pixelpipe_cache_wait_t |
| gboolean dt_dev_pixelpipe_activemodule_disables_currentmodule | ( | struct dt_develop_t * | dev, |
| struct dt_iop_module_t * | current_module | ||
| ) |
| gboolean dt_dev_pixelpipe_cache_peek_gui | ( | dt_dev_pixelpipe_t * | pipe, |
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| void ** | data, | ||
| struct dt_pixel_cache_entry_t ** | cache_entry, | ||
| dt_dev_pixelpipe_cache_wait_t * | wait, | ||
| dt_dev_pixelpipe_cache_ready_callback_t | restart, | ||
| gpointer | restart_data | ||
| ) |
Reopen one GUI-visible host cacheline, or queue the minimal pipe recompute needed to publish it.
GUI samplers only consume host-visible buffers. This wrapper first tries to reopen the requested cacheline:
piece output if piece is not NULL,piece is NULL.If that cacheline does not exist yet, or only exists as a device-side OpenCL payload, the wrapper schedules one dedicated pipe run:
The request uses a dedicated pipe state instead of pretending history changed, so the worker can rerun just enough of the current synchronized graph to satisfy the GUI reader.
| pipe | Current live pipe. |
| piece | Target module piece, or NULL for the final backbuffer. |
| data | Returned host-visible pixel buffer on success. |
| cache_entry | Returned cache entry owning data on success. |
| wait | Optional one-shot cacheline-ready watcher owned by the caller. |
| restart | Optional restart callback used with wait when the cacheline must be published asynchronously. |
| restart_data | Opaque pointer forwarded to restart. |
| void dt_dev_pixelpipe_cache_wait_cleanup | ( | dt_dev_pixelpipe_cache_wait_t * | wait | ) |
References _dt_dev_pixelpipe_cache_wait_ready_callback(), dt_dev_pixelpipe_cache_wait_t::connected, darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, DT_PIXELPIPE_CACHE_HASH_INVALID, FALSE, dt_dev_pixelpipe_cache_wait_t::hash, IS_NULL_PTR, dt_dev_pixelpipe_cache_wait_t::pipe, dt_dev_pixelpipe_cache_wait_t::restart, darktable_t::signals, and dt_dev_pixelpipe_cache_wait_t::user_data.
Referenced by _dt_dev_pixelpipe_cache_wait_ready_callback(), and dt_dev_pixelpipe_cache_peek_gui().
| void dt_dev_pixelpipe_change | ( | struct dt_dev_pixelpipe_t * | pipe | ) |
Consume and clear pending change flags in one atomic step.
The previous get-then-store sequence could lose updates when another thread OR-ed a new flag between the load and the reset. That made history resync requests randomly disappear, especially under fast GUI actions such as toggles or consecutive parameter commits.
References _get_debug_pipe_name(), _refresh_pipe_detail_mask_state(), _seal_opencl_cache_policy(), _sync_realtime_top_history_in_place(), dt_dev_pixelpipe_t::bypass_blendif, dt_dev_pixelpipe_t::changed, dt_dev_pixelpipe_t::dev, dt_atomic_exch_int(), DT_DEBUG_DEV, DT_DEV_DETAIL_MASK_NONE, dt_dev_get_history_hash(), DT_DEV_PIPE_CACHE_REQUEST, DT_DEV_PIPE_REMOVE, DT_DEV_PIPE_SYNCH, DT_DEV_PIPE_TOP_CHANGED, DT_DEV_PIPE_UNCHANGED, DT_DEV_PIPE_ZOOMED, dt_dev_pixelpipe_cleanup_nodes(), dt_dev_pixelpipe_create_nodes(), DT_DEV_PIXELPIPE_DISPLAY_NONE, dt_dev_pixelpipe_get_roi_out(), dt_dev_pixelpipe_set_history_hash(), dt_dev_pixelpipe_sync_no_history(), dt_dev_pixelpipe_synch_all, dt_dev_pixelpipe_synch_top(), dt_free, dt_get_times(), dt_print(), dt_pthread_rwlock_rdlock, dt_pthread_rwlock_unlock, dt_show_times_f(), dt_develop_t::history_mutex, dt_dev_pixelpipe_t::iheight, dt_dev_pixelpipe_t::iwidth, dt_dev_pixelpipe_t::mask_display, dt_dev_pixelpipe_t::nodes, dt_dev_pixelpipe_t::processed_height, dt_dev_pixelpipe_t::processed_width, type, and dt_dev_pixelpipe_t::want_detail_mask.
Referenced by _sync_virtual_pipe(), dt_dev_darkroom_pipeline(), and dt_dev_get_thumbnail_size().
| void dt_dev_pixelpipe_change_zoom_main | ( | struct dt_develop_t * | dev | ) |
References darktable, dt_atomic_set_int(), dt_control_navigation_redraw(), dt_dev_pixelpipe_set_realtime(), dt_dev_pixelpipe_update_zoom_main, dt_dev_update_mouse_effect_radius(), dt_ui_center(), FALSE, darktable_t::gui, dt_develop_t::gui_attached, IS_NULL_PTR, dt_develop_t::pipe, dt_dev_pixelpipe_t::shutdown, TRUE, and dt_gui_gtk_t::ui.
Referenced by _change_scaling(), _key_scroll(), _lib_navigation_set_position(), _toggle_side_borders_accel_callback(), _zoom_preset_change(), display_borders_callback(), full_screen_callback(), and mouse_moved().
| const struct dt_dev_pixelpipe_iop_t * dt_dev_pixelpipe_get_module_piece | ( | const struct dt_dev_pixelpipe_t * | pipe, |
| const struct dt_iop_module_t * | module | ||
| ) |
Return the enabled piece owned by module in pipe.
GUI-side cache readers must resolve the current live piece from the current pipe graph every time they sample. Piece pointers are not stable across history resyncs or pipe rebuilds, so callers should never persist them.
| pipe | Current pipe graph. |
| module | Module instance to look up. |
module, or NULL if none exists in the current pipe graph. | const struct dt_dev_pixelpipe_iop_t * dt_dev_pixelpipe_get_prev_enabled_piece | ( | const struct dt_dev_pixelpipe_t * | pipe, |
| const struct dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Return the closest enabled piece located immediately before piece in pipe.
Cache readers that need the input buffer of one module must reopen the previous enabled module output, not simply the previous list node, because disabled pieces keep their place in pipe->nodes while not producing any cacheline. This utility keeps that rule centralized at the pixelpipe level.
| pipe | Current pipe graph. |
| piece | Reference piece inside pipe. |
piece is the first enabled node or if either input is invalid. | void dt_dev_pixelpipe_get_roi_in | ( | struct dt_dev_pixelpipe_t * | pipe, |
| const struct dt_iop_roi_t | roi_out | ||
| ) |
References _get_debug_pipe_name(), dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::cst, darktable, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, dt_image_t::dsc, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_pixelpipe_iop_t::dsc_out, DT_DEBUG_PIPE, dt_dev_pixelpipe_activemodule_disables_currentmodule(), dt_free, dt_print(), dt_dev_pixelpipe_iop_t::enabled, FALSE, dt_iop_buffer_dsc_t::filters, dt_iop_roi_t::height, dt_develop_t::image_storage, IOP_CS_RAW, dt_dev_pixelpipe_t::nodes, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::scale, darktable_t::unmuted, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_iop_buffer_dsc_t::xtrans, and dt_iop_roi_t::y.
Referenced by dt_dev_pixelpipe_process().
| void dt_dev_pixelpipe_get_roi_out | ( | struct dt_dev_pixelpipe_t * | pipe, |
| const int | width_in, | ||
| const int | height_in, | ||
| int * | width, | ||
| int * | height | ||
| ) |
References _get_debug_pipe_name(), dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::buf_out, darktable, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, DT_DEBUG_PIPE, dt_dev_pixelpipe_activemodule_disables_currentmodule(), dt_free, dt_print(), dt_dev_pixelpipe_iop_t::enabled, FALSE, height, dt_iop_roi_t::height, dt_dev_pixelpipe_t::nodes, dt_iop_roi_t::scale, darktable_t::unmuted, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by dt_dev_get_thumbnail_size(), dt_dev_pixelpipe_change(), dt_focus_draw_clusters(), and dt_imageio_export_with_flags().
| gboolean dt_dev_pixelpipe_is_backbufer_valid | ( | struct dt_dev_pixelpipe_t * | pipe | ) |
References dt_dev_pixelpipe_t::backbuf, dt_dev_pixelpipe_t::dev, dt_dev_backbuf_get_hash(), dt_dev_backbuf_get_history_hash(), dt_dev_get_history_hash(), dt_dev_pixelpipe_get_hash(), and DT_PIXELPIPE_CACHE_HASH_INVALID.
Referenced by _do_get_structure_auto(), _do_get_structure_lines(), _do_get_structure_quad(), _is_backbuf_ready(), and _lib_navigation_draw_callback().
| gboolean dt_dev_pixelpipe_is_pipeline_valid | ( | struct dt_dev_pixelpipe_t * | pipe | ) |
| uint64_t dt_dev_pixelpipe_node_hash | ( | struct dt_dev_pixelpipe_t * | pipe, |
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const struct dt_iop_roi_t | , | ||
| const int | pos | ||
| ) |
| void dt_dev_pixelpipe_rebuild_all_real | ( | struct dt_develop_t * | dev | ) |
| void dt_dev_pixelpipe_reset_all | ( | struct dt_develop_t * | dev | ) |
| void dt_dev_pixelpipe_resync_history_all_real | ( | struct dt_develop_t * | dev | ) |
| void dt_dev_pixelpipe_resync_history_main_real | ( | struct dt_develop_t * | dev | ) |
References _change_pipe(), DT_DEV_PIPE_SYNCH, dt_develop_t::gui_attached, IS_NULL_PTR, and dt_develop_t::pipe.
| void dt_dev_pixelpipe_resync_history_preview_real | ( | struct dt_develop_t * | dev | ) |
| void dt_dev_pixelpipe_sync_virtual | ( | struct dt_develop_t * | dev, |
| dt_dev_pixelpipe_change_t | flag | ||
| ) |
References _sync_virtual_pipe(), and flag.
Referenced by gui_post_expose(), and gui_post_expose().
| void dt_dev_pixelpipe_update_history_all_real | ( | struct dt_develop_t * | dev | ) |
| void dt_dev_pixelpipe_update_history_main_real | ( | struct dt_develop_t * | dev | ) |
References _change_pipe(), DT_DEV_PIPE_TOP_CHANGED, dt_develop_t::gui_attached, IS_NULL_PTR, and dt_develop_t::pipe.
| void dt_dev_pixelpipe_update_history_preview_real | ( | struct dt_develop_t * | dev | ) |
| void dt_dev_pixelpipe_update_zoom_main_real | ( | struct dt_develop_t * | dev | ) |
| void dt_dev_pixelpipe_update_zoom_preview_real | ( | struct dt_develop_t * | dev | ) |
| void dt_pixelpipe_get_global_hash | ( | struct dt_dev_pixelpipe_t * | pipe | ) |
References _default_pipe_hash(), _get_debug_pipe_name(), dt_dev_pixelpipe_iop_t::blendop_hash, dt_iop_buffer_dsc_t::bpp, dt_dev_pixelpipe_iop_t::bypass_cache, dt_dev_pixelpipe_t::bypass_cache, darktable, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, dt_dev_pixelpipe_iop_t::dsc_in, dt_dev_pixelpipe_iop_t::dsc_out, DT_DEBUG_PIPE, DT_DEBUG_VERBOSE, dt_dev_pixelpipe_activemodule_disables_currentmodule(), DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_FULL, dt_dev_pixelpipe_set_hash(), dt_hash(), dt_print(), dt_dev_pixelpipe_iop_t::enabled, FALSE, dt_dev_pixelpipe_iop_t::global_hash, dt_dev_pixelpipe_iop_t::global_mask_hash, dt_develop_t::gui_attached, dt_develop_t::gui_module, dt_dev_pixelpipe_iop_t::hash, IOP_TAG_DISTORT, dt_dev_pixelpipe_t::nodes, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, TRUE, type, dt_dev_pixelpipe_t::type, and darktable_t::unmuted.
Referenced by _sync_realtime_top_history_in_place(), and dt_dev_pixelpipe_process().