![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <cairo.h>#include "common/darktable.h"#include "develop/pixelpipe_hb.h"#include "develop/dev_pixelpipe.h"
Include dependency graph for dev_backbuf.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_locked_surface_t |
Typedefs | |
| typedef struct dt_dev_locked_surface_t | dt_dev_locked_surface_t |
| typedef struct dt_dev_locked_surface_t dt_dev_locked_surface_t |
A GUI-side view onto one pipe's currently published backbuffer: wraps the pipe cache's own memory, never an independent copy (pixelpipe_hb.c owns the keepalive ref). Callers declare and own their own instance(s) - darkroom keeps one for dev->pipe and one for dev->preview_pipe, Studio Capture owns exactly one, for its main pipe only. Initialize .hash to DT_PIXELPIPE_CACHE_HASH_INVALID before first use - a zero-initialized (calloc'd) instance looks like a valid hash of 0, not the sentinel.
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 struct dt_develop_t * | dev, |
| dt_aligned_pixel_t | bg_color | ||
| ) |
Pick the background color for the center view: ISO 12646's fixed L=50 grey when enabled, the user's "display/brightness" conf otherwise.
| 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 struct dt_develop_t * | dev, | ||
| dt_dev_locked_surface_t * | locked, | ||
| int | width, | ||
| int | height, | ||
| int | border, | ||
| const dt_aligned_pixel_t | bg_color | ||
| ) |
Paint locked's surface into cr, centered in a width x height widget with border px margin and bg_color background; also draws the ISO 12646 white surround iff dev->iso_12646.enabled. Pure paint - call dt_dev_lock_pipe_surface() first.