![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "views/dev_backbuf.h"#include "bauhaus/bauhaus.h"#include "common/colorspaces.h"#include "common/colorspaces_inline_conversions.h"#include "common/darktable.h"#include "control/control.h"#include "develop/develop.h"#include "develop/pixelpipe_cache.h"#include "develop/pixelpipe_hb.h"#include "develop/supervisor.h"#include <pango/pangocairo.h>
Include dependency graph for dev_backbuf.c:Go to the source code of this file.
|
static |
Shared pixelpipe-backbuffer-to-screen compositing for any view owning its own dt_develop_t (darkroom, Studio Capture...). Extracted from darkroom.c, which keeps its own multi-tier main/preview/fallback cascade on top of the primitives here; a caller wanting just the main pipe's live output (no separate preview-pipe substitution tier) uses dt_dev_paint_main_backbuf().
Definition at line 36 of file dev_backbuf.c.
References darktable_t::color_profiles, darktable, dt_Lab_to_XYZ(), L, Lab, RGB, dt_colorspaces_t::transform_xyz_to_display, and XYZ.
Referenced by dt_dev_get_background_color().
|
static |
Definition at line 107 of file dev_backbuf.c.
References dt_control_queue_redraw_center(), dt_develop_t::gui_attached, and IS_NULL_PTR.
Referenced by dt_dev_lock_pipe_surface().
Draw the ISO 12646 white surround rectangle around a width x height image with border px margin.
Definition at line 53 of file dev_backbuf.c.
Referenced by _build_preview_fallback_surface(), dt_dev_render_locked_surface(), and expose().
| void dt_dev_draw_profile_mode_label | ( | cairo_t * | cri, |
| int | height | ||
| ) |
Draw the "soft proof" / "gamut check" text overlay in the bottom-left corner when darktable.color_profiles->mode is not DT_PROFILE_NORMAL; a no-op otherwise.
Definition at line 61 of file dev_backbuf.c.
References darktable_t::bauhaus, darktable_t::color_profiles, darktable, DT_PIXEL_APPLY_DPI, DT_PROFILE_GAMUTCHECK, DT_PROFILE_NORMAL, height, dt_colorspaces_t::mode, and dt_bauhaus_t::pango_font_desc.
| void dt_dev_get_background_color | ( | const dt_develop_t * | dev, |
| dt_aligned_pixel_t | bg_color | ||
| ) |
Definition at line 44 of file dev_backbuf.c.
References _colormanage_ui_color(), dt_conf_get_int(), dt_develop_t::enabled, and dt_develop_t::iso_12646.
| gboolean dt_dev_lock_pipe_surface | ( | struct dt_develop_t * | dev, |
| struct dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_locked_surface_t * | locked, | ||
| dt_dev_pixelpipe_cache_wait_t * | wait, | ||
| const char * | wait_owner_tag, | ||
| gboolean | keep_previous_on_fail | ||
| ) |
(Re)bind locked to pipe's currently published backbuffer if it is newer/still valid. wait and wait_owner_tag are the caller's own dt_dev_pixelpipe_cache_wait_t instance and a short static debug label (e.g. "darkroom-main", "studio-capture-main"). keep_previous_on_fail: on a miss, keep whatever locked already held instead of dropping it.
Definition at line 114 of file dev_backbuf.c.
References _dev_backbuf_restart_cache_wait(), dt_dev_pixelpipe_t::backbuf, dt_pixel_cache_entry_t::data, dt_dev_locked_surface_t::data, dt_dev_backbuf_get_hash(), dt_dev_pixelpipe_cache_peek_gui(), dt_dev_pixelpipe_cache_wait_set_owner(), dt_dev_release_locked_surface(), dt_pixel_cache_entry_get_data(), dt_pixel_cache_entry_get_size(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_supervisor_active(), dt_supervisor_widget(), DT_SV_READ, dt_dev_locked_surface_t::entry, FALSE, dt_pixel_cache_entry_t::hash, dt_dev_locked_surface_t::hash, height, dt_backbuf_t::height, dt_dev_locked_surface_t::height, dt_dev_pixelpipe_t::imgid, IS_NULL_PTR, dt_dev_locked_surface_t::surface, TRUE, dt_dev_pixelpipe_t::type, width, dt_backbuf_t::width, and dt_dev_locked_surface_t::width.
Referenced by dt_dev_paint_main_backbuf(), expose(), and expose().
| gboolean dt_dev_paint_main_backbuf | ( | dt_dev_locked_surface_t * | locked, |
| dt_dev_pixelpipe_cache_wait_t * | wait, | ||
| const char * | wait_owner_tag, | ||
| cairo_t * | cr, | ||
| struct dt_develop_t * | dev, | ||
| int | width, | ||
| int | height, | ||
| int | border, | ||
| const dt_aligned_pixel_t | bg_color, | ||
| gboolean | keep_previous_on_fail | ||
| ) |
Convenience for a caller that only wants the main (FULL) pipe's tier, with no separate preview-pipe substitution: lock + render dev->pipe in one call. This is what Studio Capture uses; darkroom's own multi-tier fallback cascade calls dt_dev_lock_pipe_surface()/dt_dev_render_locked_surface() directly instead.
Definition at line 232 of file dev_backbuf.c.
References dt_dev_lock_pipe_surface(), dt_dev_render_locked_surface(), FALSE, height, IS_NULL_PTR, dt_develop_t::pipe, dt_dev_locked_surface_t::surface, and width.
| void dt_dev_release_locked_surface | ( | dt_dev_locked_surface_t * | locked | ) |
Drop everything locked references. Does not touch the pipe cache entry itself (pixelpipe_hb.c owns it). Callers MUST call this, on every instance they own, before their dev's pipeline nodes/backbufs are torn down.
Definition at line 87 of file dev_backbuf.c.
References dt_dev_locked_surface_t::data, DT_PIXELPIPE_CACHE_HASH_INVALID, dt_dev_locked_surface_t::entry, dt_dev_locked_surface_t::hash, dt_dev_locked_surface_t::height, IS_NULL_PTR, dt_dev_locked_surface_t::surface, and dt_dev_locked_surface_t::width.
Referenced by _release_expose_source_caches(), _studio_dev_teardown(), and dt_dev_lock_pipe_surface().
| gboolean dt_dev_render_locked_surface | ( | cairo_t * | cr, |
| const dt_develop_t * | dev, | ||
| dt_dev_locked_surface_t * | locked, | ||
| const int | width, | ||
| const int | height, | ||
| const int | border, | ||
| const dt_aligned_pixel_t | bg_color | ||
| ) |
Definition at line 202 of file dev_backbuf.c.
References darktable, dt_dev_draw_iso12646_border(), dt_dev_pixelpipe_cache_rdlock_entry(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_develop_t::enabled, dt_dev_locked_surface_t::entry, FALSE, darktable_t::gui, dt_dev_locked_surface_t::hash, height, dt_dev_locked_surface_t::height, IS_NULL_PTR, dt_develop_t::iso_12646, darktable_t::pixelpipe_cache, dt_gui_gtk_t::ppd, dt_dev_locked_surface_t::surface, TRUE, width, and dt_dev_locked_surface_t::width.
Referenced by dt_dev_paint_main_backbuf(), expose(), and expose().