Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
supervisor.c File Reference
#include "develop/supervisor.h"
#include "common/image.h"
#include "common/introspection.h"
#include "develop/imageop.h"
#include "develop/blend.h"
#include "develop/masks.h"
#include "develop/pixelpipe_cache.h"
#include "develop/pixelpipe_hb.h"
#include <json-glib/json-glib.h>
#include <stdarg.h>
#include <stdio.h>
+ Include dependency graph for supervisor.c:

Go to the source code of this file.

Data Structures

struct  dt_sv_entry_t
 

Macros

#define DT_SV_LOG_MAX   20000
 

Typedefs

typedef enum dt_sv_facet_t dt_sv_facet_t
 
typedef struct dt_sv_entry_t dt_sv_entry_t
 

Enumerations

enum  dt_sv_facet_t {
  DT_SV_F_HISTORY = 1 << 0 ,
  DT_SV_F_NODE = 1 << 1 ,
  DT_SV_F_CACHE = 1 << 2 ,
  DT_SV_F_BACKBUF = 1 << 3 ,
  DT_SV_F_WIDGET = 1 << 4 ,
  DT_SV_F_THUMB = 1 << 5 ,
  DT_SV_F_MIPMAP = 1 << 6 ,
  DT_SV_F_IMAGE = 1 << 7 ,
  DT_SV_F_FORM = 1 << 8 ,
  DT_SV_F_CACHEWAIT = 1 << 9
}
 

Functions

static void _logged_event_free (gpointer p)
 
static gboolean _hash_is_set (const uint64_t h)
 
static const char * _op_str (const dt_sv_op_t op)
 
static uint64_t _fnv1a (const char *s, const int a, const int b)
 
uint64_t dt_supervisor_node_key (const int pipe_type, const char *op_name, const int multi_priority)
 
static uint64_t _thumb_key (const int32_t imgid, const int mip)
 
uint64_t dt_supervisor_thumbnail_key (const int32_t imgid, const int mip)
 
static uint64_t _mipmap_key (const int32_t imgid, const int mip)
 
uint64_t dt_supervisor_mipmap_key (const int32_t imgid, const int mip)
 
static uint64_t _image_key (const int32_t imgid)
 
uint64_t dt_supervisor_image_key (const int32_t imgid)
 
static uint64_t _form_key (const int formid)
 
static uint64_t _cache_wait_key (const uint64_t request_id)
 
uint64_t dt_supervisor_form_key (const int formid)
 
static const char * _form_type_name (const int type)
 
static JsonArray * _form_members_json (const dt_masks_form_t *form)
 
static JsonArray * _forms_json (GList *forms)
 
static void _device_string (const int devid, char *out, const size_t out_size)
 
static const char * _thread_tag (void)
 
void dt_supervisor_init (void)
 
void dt_supervisor_cleanup (void)
 
void dt_supervisor_set_recording (const gboolean on)
 
void dt_supervisor_events_clear (void)
 
static dt_sv_entry_t_entry_get_locked (const uint64_t hash, gboolean *created)
 
static gboolean _touch_alive_locked (dt_sv_entry_t *e, const gboolean created, const dt_sv_op_t op)
 
static const char * _primary_domain (const dt_sv_entry_t *e)
 
static int _entry_pipe_type (const dt_sv_entry_t *e)
 
static void _module_label (const dt_sv_entry_t *e, char *out, const size_t out_size)
 
static void _set_hash_member (JsonObject *o, const char *name, const uint64_t hash)
 
static JsonObject * _resolve_locked (const uint64_t hash)
 
static uint64_t _parse_hash (const char *s)
 
static dt_sv_logged_event_t_extract_event (JsonObject *root, const gchar *json_str)
 
static void _log_push (dt_sv_logged_event_t *e)
 
static void _emit_line (JsonObject *root)
 
static void _introspect_dump (dt_introspection_field_t *field, const char *prefix, gpointer params, JsonArray *out)
 
static JsonArray * _params_json (const dt_iop_module_t *module, const void *params)
 
static void _arr_addf (JsonArray *out, const char *fmt,...) G_GNUC_PRINTF(2
 
static const char * _name_for_value (const dt_develop_name_value_t *list, const int value)
 
static void _arr_add_enum (JsonArray *out, const char *label, const dt_develop_name_value_t *names, const int value)
 
static JsonArray * _blendop_json (const dt_develop_blend_params_t *bp)
 
static JsonObject * _envelope (const dt_sv_op_t op, const char *domain, const uint64_t hash, const int pipe_type, const int32_t imgid, const gboolean alive, const gboolean resurrected)
 
void dt_supervisor_history (const dt_sv_op_t op, const uint64_t param_hash, const char *op_name, const int multi_priority, const char *multi_name, const int iop_order, const int history_index, const int32_t imgid, const gboolean enabled, const dt_iop_module_t *module, const void *params, const dt_develop_blend_params_t *blend_params, GList *forms)
 
void dt_supervisor_node (const dt_sv_op_t op, const uint64_t node_hash, const uint64_t param_hash, const uint64_t predecessor_hash, const char *op_name, const int multi_priority, const int iop_order, const int pipe_type, const int32_t imgid)
 
void dt_supervisor_cacheline_create (const uint64_t hash, const uint64_t node_hash, const uint64_t param_hash, const uint64_t input_hash, const char *op_name, const int multi_priority, const int iop_order, const int pipe_type, const int32_t imgid, const int roi_w, const int roi_h, const int devid, const size_t size, const char *name)
 
void dt_supervisor_cacheline_read (const uint64_t hash, const size_t size)
 
void dt_supervisor_cacheline_delete (const uint64_t hash, const size_t size, const int owner_pipe_id, const char *name)
 
void dt_supervisor_cache_wait (const dt_sv_op_t op, const uint64_t request_id, const uint64_t awaited_hash, const char *owner_tag, const char *op_name, const int multi_priority, const int pipe_type, const int32_t imgid, const gboolean request_emitted, const char *note)
 
static JsonObject * _rekey_record (const dt_sv_op_t op, const dt_sv_entry_t *e, const uint64_t hash, const char *link_field, const uint64_t link_hash, const gboolean alive)
 
void dt_supervisor_rekey (const uint64_t old_hash, const uint64_t new_hash)
 
void dt_supervisor_backbuf (const dt_sv_op_t op, const uint64_t hash, const uint64_t history_hash, const int w, const int h, const int bpp, const int pipe_type, const int devid)
 
void dt_supervisor_widget (const dt_sv_op_t op, const char *widget_tag, const uint64_t consumed_hash, const int pipe_type, const int32_t imgid)
 
void dt_supervisor_thumbnail (const dt_sv_op_t op, const int32_t imgid, const int width, const int height, const int mip, const gboolean success)
 
static JsonObject * _image_properties_json (const dt_image_t *img)
 
void dt_supervisor_mipmap (const dt_sv_op_t op, const int32_t imgid, const int mip)
 
void dt_supervisor_image (const dt_sv_op_t op, const int32_t imgid, const dt_image_t *img)
 
void dt_supervisor_form (const dt_sv_op_t op, const dt_masks_form_t *form)
 
static void _describe_edge (GString *s, const char *prefix, const uint64_t hash)
 
gchar * dt_supervisor_describe (const uint64_t hash)
 
static dt_sv_logged_event_t_event_copy (const dt_sv_logged_event_t *src)
 
GPtrArray * dt_supervisor_events_snapshot (void)
 
GPtrArray * dt_supervisor_events_snapshot_since (const uint64_t after_seq, uint64_t *out_last_seq)
 
guint dt_supervisor_events_count (void)
 
void dt_supervisor_events_free (GPtrArray *events)
 

Variables

gint dt_supervisor_recording = 0
 
struct { 
 
   GHashTable *   entries 
 
   GQueue *   log 
 
   uint64_t   next_seq 
 
   dt_pthread_mutex_t   lock 
 
   gboolean   inited 
 
_sv = { 0 } 
 

Macro Definition Documentation

◆ DT_SV_LOG_MAX

#define DT_SV_LOG_MAX   20000

Definition at line 110 of file supervisor.c.

Typedef Documentation

◆ dt_sv_entry_t

typedef struct dt_sv_entry_t dt_sv_entry_t

◆ dt_sv_facet_t

Enumeration Type Documentation

◆ dt_sv_facet_t

Enumerator
DT_SV_F_HISTORY 
DT_SV_F_NODE 
DT_SV_F_CACHE 
DT_SV_F_BACKBUF 
DT_SV_F_WIDGET 
DT_SV_F_THUMB 
DT_SV_F_MIPMAP 
DT_SV_F_IMAGE 
DT_SV_F_FORM 
DT_SV_F_CACHEWAIT 

Definition at line 35 of file supervisor.c.

Function Documentation

◆ _arr_add_enum()

static void _arr_add_enum ( JsonArray *  out,
const char *  label,
const dt_develop_name_value_t names,
const int  value 
)
static

Definition at line 745 of file supervisor.c.

References _arr_addf(), _name_for_value(), n, out, and value.

Referenced by _blendop_json().

◆ _arr_addf()

static void static void _arr_addf ( JsonArray *  out,
const char *  fmt,
  ... 
)
static

Definition at line 728 of file supervisor.c.

References out.

Referenced by _arr_add_enum(), and _blendop_json().

◆ _blendop_json()

◆ _cache_wait_key()

static uint64_t _cache_wait_key ( const uint64_t  request_id)
static

Definition at line 204 of file supervisor.c.

References _fnv1a().

Referenced by dt_supervisor_cache_wait().

◆ _describe_edge()

static void _describe_edge ( GString *  s,
const char *  prefix,
const uint64_t  hash 
)
static

Definition at line 1367 of file supervisor.c.

References _hash_is_set(), _module_label(), _sv, and dt_sv_entry_t::alive.

Referenced by dt_supervisor_describe().

◆ _device_string()

static void _device_string ( const int  devid,
char *  out,
const size_t  out_size 
)
static

Definition at line 270 of file supervisor.c.

References out.

Referenced by dt_supervisor_backbuf(), dt_supervisor_cacheline_create(), and dt_supervisor_describe().

◆ _emit_line()

◆ _entry_get_locked()

◆ _entry_pipe_type()

static int _entry_pipe_type ( const dt_sv_entry_t e)
static

◆ _envelope()

◆ _event_copy()

◆ _extract_event()

◆ _fnv1a()

static uint64_t _fnv1a ( const char *  s,
const int  a,
const int  b 
)
static

◆ _form_key()

static uint64_t _form_key ( const int  formid)
static

Definition at line 196 of file supervisor.c.

References _fnv1a().

Referenced by _form_members_json(), _forms_json(), dt_supervisor_form(), and dt_supervisor_form_key().

◆ _form_members_json()

static JsonArray * _form_members_json ( const dt_masks_form_t form)
static

Definition at line 228 of file supervisor.c.

References _form_key(), DT_MASKS_GROUP, g, p, dt_masks_form_t::points, and dt_masks_form_t::type.

Referenced by _forms_json(), and dt_supervisor_form().

◆ _form_type_name()

static const char * _form_type_name ( const int  type)
static

◆ _forms_json()

static JsonArray * _forms_json ( GList *  forms)
static

◆ _hash_is_set()

static gboolean _hash_is_set ( const uint64_t  h)
inlinestatic

◆ _image_key()

static uint64_t _image_key ( const int32_t  imgid)
static

◆ _image_properties_json()

◆ _introspect_dump()

◆ _log_push()

static void _log_push ( dt_sv_logged_event_t e)
static

◆ _logged_event_free()

◆ _mipmap_key()

static uint64_t _mipmap_key ( const int32_t  imgid,
const int  mip 
)
static

Definition at line 176 of file supervisor.c.

References _fnv1a().

Referenced by dt_supervisor_mipmap(), dt_supervisor_mipmap_key(), and dt_supervisor_thumbnail().

◆ _module_label()

◆ _name_for_value()

static const char * _name_for_value ( const dt_develop_name_value_t list,
const int  value 
)
static

Definition at line 738 of file supervisor.c.

References i, dt_iop_blend_name_value_t::name, and value.

Referenced by _arr_add_enum().

◆ _op_str()

static const char * _op_str ( const dt_sv_op_t  op)
static

Definition at line 137 of file supervisor.c.

References DT_SV_CREATE, DT_SV_DELETE, DT_SV_READ, and DT_SV_UPDATE.

Referenced by _envelope().

◆ _params_json()

static JsonArray * _params_json ( const dt_iop_module_t module,
const void params 
)
static

◆ _parse_hash()

static uint64_t _parse_hash ( const char *  s)
static

Definition at line 423 of file supervisor.c.

Referenced by _extract_event().

◆ _primary_domain()

static const char * _primary_domain ( const dt_sv_entry_t e)
static

◆ _rekey_record()

static JsonObject * _rekey_record ( const dt_sv_op_t  op,
const dt_sv_entry_t e,
const uint64_t  hash,
const char *  link_field,
const uint64_t  link_hash,
const gboolean  alive 
)
static

◆ _resolve_locked()

◆ _set_hash_member()

static void _set_hash_member ( JsonObject *  o,
const char *  name,
const uint64_t  hash 
)
static

◆ _thread_tag()

static const char * _thread_tag ( void  )
static

Definition at line 276 of file supervisor.c.

Referenced by _envelope().

◆ _thumb_key()

static uint64_t _thumb_key ( const int32_t  imgid,
const int  mip 
)
static

Definition at line 166 of file supervisor.c.

References _fnv1a().

Referenced by dt_supervisor_thumbnail(), and dt_supervisor_thumbnail_key().

◆ _touch_alive_locked()

◆ dt_supervisor_backbuf()

void dt_supervisor_backbuf ( dt_sv_op_t  op,
uint64_t  hash,
uint64_t  history_hash,
int  w,
int  h,
int  bpp,
int  pipe_type,
int  devid 
)

◆ dt_supervisor_cache_wait()

void dt_supervisor_cache_wait ( dt_sv_op_t  op,
uint64_t  request_id,
uint64_t  awaited_hash,
const char *  owner_tag,
const char *  op_name,
int  multi_priority,
int  pipe_type,
int32_t  imgid,
gboolean  request_emitted,
const char *  note 
)

Cache-wait request event — one queued GUI fetch through the cache-wait manager (dev_pixelpipe.c). Keyed by a synthetic key over request_id, so the queue / serve / cancel of one request fold onto a single object and successive requests from the same consumer stay distinct.

The event carries an awaits edge to the cacheline hash the GUI is blocked on: clicking it walks cache-wait -> awaits -> cacheline. If no cacheline was ever published under that hash, the edge degrades to a raw awaits_hash — that missing target is the fingerprint of the "order to grab a cacheline is never processed" failure (the pipe published a different hash than the GUI awaits, so CACHELINE_READY never matches the pending record).

Parameters
opCREATE at queue, READ on a deduped re-poll (a repeat peek that found the same wait in flight and suppressed a new CACHE_REQUEST), DELETE at serve or cancel.
request_idthe wait's monotonic request id (identity).
awaited_hashthe cacheline hash being waited on.
owner_tagconsumer label (e.g. "color-picker-input").
op_nametarget module op (NULL for a backbuf request).
request_emittedTRUE when this event also (re)emitted a CACHE_REQUEST to the pipe; FALSE on a deduped re-poll.
noteoptional free-text qualifier ("served", "cancelled: …").

Definition at line 1013 of file supervisor.c.

References _cache_wait_key(), _emit_line(), _entry_get_locked(), _envelope(), _hash_is_set(), _module_label(), _resolve_locked(), _set_hash_member(), _sv, _touch_alive_locked(), dt_sv_entry_t::alive, dt_sv_entry_t::awaits_hash, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_supervisor_active(), DT_SV_F_CACHEWAIT, dt_sv_entry_t::facets, dt_sv_entry_t::imgid, key, dt_sv_entry_t::multi_priority, dt_sv_entry_t::op_name, dt_sv_entry_t::owner_tag, dt_sv_entry_t::pipe_type, dt_sv_entry_t::request_emitted, and dt_sv_entry_t::request_id.

Referenced by _dt_dev_pixelpipe_cache_wait_ready_callback(), dt_dev_pixelpipe_cache_peek_gui(), and dt_dev_pixelpipe_cache_wait_cleanup().

◆ dt_supervisor_cacheline_create()

void dt_supervisor_cacheline_create ( uint64_t  hash,
uint64_t  node_hash,
uint64_t  param_hash,
uint64_t  input_hash,
const char *  op_name,
int  multi_priority,
int  iop_order,
int  pipe_type,
int32_t  imgid,
int  roi_w,
int  roi_h,
int  devid,
size_t  size,
const char *  name 
)

Cacheline output created at runtime publish — keyed by the produced output hash (piece->global_hash). Carries the full linkage so later READ/DELETE events (which only know the hash) resolve against the registry memory.

Parameters
node_hashproducing topology node (dt_supervisor_node_key()).
param_hashpiece->hash, links to the history/module identity.
input_hashprevious enabled piece's output hash, or INVALID/0.
devidOpenCL device id, or < 0 for CPU.

Definition at line 891 of file supervisor.c.

References _device_string(), _emit_line(), _entry_get_locked(), _envelope(), _hash_is_set(), _module_label(), _resolve_locked(), _sv, _touch_alive_locked(), dt_sv_entry_t::alive, dt_sv_entry_t::cl_name, dt_sv_entry_t::devid, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_supervisor_active(), DT_SV_CREATE, DT_SV_F_CACHE, dt_sv_entry_t::facets, dt_sv_entry_t::imgid, dt_sv_entry_t::input_hash, dt_sv_entry_t::iop_order, dt_sv_entry_t::multi_priority, name, dt_sv_entry_t::node_hash, dt_sv_entry_t::op_name, dt_sv_entry_t::param_hash, dt_sv_entry_t::pipe_type, dt_sv_entry_t::roi_h, dt_sv_entry_t::roi_w, size, and dt_sv_entry_t::size.

Referenced by dt_dev_pixelpipe_process_rec(), dt_develop_blend_process(), and dt_develop_blend_process_cl().

◆ dt_supervisor_cacheline_delete()

◆ dt_supervisor_cacheline_read()

◆ dt_supervisor_cleanup()

void dt_supervisor_cleanup ( void  )

◆ dt_supervisor_describe()

gchar * dt_supervisor_describe ( uint64_t  hash)

◆ dt_supervisor_events_clear()

void dt_supervisor_events_clear ( void  )

Definition at line 310 of file supervisor.c.

References _logged_event_free(), _sv, dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().

Referenced by _on_clear().

◆ dt_supervisor_events_count()

guint dt_supervisor_events_count ( void  )

Definition at line 1508 of file supervisor.c.

References _sv, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), and n.

Referenced by _update_count().

◆ dt_supervisor_events_free()

void dt_supervisor_events_free ( GPtrArray *  events)

Definition at line 1517 of file supervisor.c.

References TRUE.

Referenced by _grouped_catch_up(), _poll(), and _run_search().

◆ dt_supervisor_events_snapshot()

GPtrArray * dt_supervisor_events_snapshot ( void  )

◆ dt_supervisor_events_snapshot_since()

GPtrArray * dt_supervisor_events_snapshot_since ( const uint64_t  after_seq,
uint64_t out_last_seq 
)

◆ dt_supervisor_form()

◆ dt_supervisor_form_key()

uint64_t dt_supervisor_form_key ( const int  formid)

Definition at line 209 of file supervisor.c.

References _form_key().

◆ dt_supervisor_history()

◆ dt_supervisor_image()

◆ dt_supervisor_image_key()

uint64_t dt_supervisor_image_key ( const int32_t  imgid)

Definition at line 191 of file supervisor.c.

References _image_key().

Referenced by _rebuild_memory().

◆ dt_supervisor_init()

void dt_supervisor_init ( void  )

Definition at line 283 of file supervisor.c.

References _sv, dt_pthread_mutex_init(), and TRUE.

Referenced by dt_init().

◆ dt_supervisor_mipmap()

void dt_supervisor_mipmap ( dt_sv_op_t  op,
int32_t  imgid,
int  mip 
)

◆ dt_supervisor_mipmap_key()

uint64_t dt_supervisor_mipmap_key ( const int32_t  imgid,
const int  mip 
)

Definition at line 181 of file supervisor.c.

References _mipmap_key().

Referenced by _rebuild_memory().

◆ dt_supervisor_node()

void dt_supervisor_node ( dt_sv_op_t  op,
uint64_t  node_hash,
uint64_t  param_hash,
uint64_t  predecessor_hash,
const char *  op_name,
int  multi_priority,
int  iop_order,
int  pipe_type,
int32_t  imgid 
)

Pipeline topology node event — keyed by dt_supervisor_node_key().

  • CREATE when the pipe builds its nodes (topology), with param_hash INVALID;
  • UPDATE when the node is synchronized with a history entry in dt_dev_pixelpipe_change(): param_hash is the committed piece->hash, which ties the node (and the cachelines it produces) to its history item;
  • DELETE when the nodes are torn down. Not emitted from the processing recursion.

Definition at line 856 of file supervisor.c.

References _emit_line(), _entry_get_locked(), _envelope(), _hash_is_set(), _module_label(), _resolve_locked(), _sv, _touch_alive_locked(), dt_sv_entry_t::alive, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_supervisor_active(), DT_SV_F_NODE, dt_sv_entry_t::facets, dt_sv_entry_t::imgid, dt_sv_entry_t::iop_order, dt_sv_entry_t::multi_priority, dt_sv_entry_t::op_name, dt_sv_entry_t::param_hash, dt_sv_entry_t::pipe_type, and dt_sv_entry_t::pred_hash.

Referenced by _sync_pipe_nodes_from_history(), _sync_pipe_nodes_from_history_from_node(), dt_dev_pixelpipe_cleanup_nodes(), and dt_dev_pixelpipe_create_nodes().

◆ dt_supervisor_node_key()

uint64_t dt_supervisor_node_key ( int  pipe_type,
const char *  op_name,
int  multi_priority 
)

Stable identity of a pipeline topology node: a function of the pipe type and the module instance (op + multi_priority), independent of parameters or ROI. The producer (create_nodes) and the consumers (a cacheline declaring its producer) call this to agree on the same key. Never returns INVALID.

Definition at line 161 of file supervisor.c.

References _fnv1a().

Referenced by _sync_pipe_nodes_from_history(), _sync_pipe_nodes_from_history_from_node(), dt_dev_pixelpipe_cache_peek_gui(), dt_dev_pixelpipe_cleanup_nodes(), dt_dev_pixelpipe_create_nodes(), dt_dev_pixelpipe_process(), dt_dev_pixelpipe_process_rec(), dt_develop_blend_process(), and dt_develop_blend_process_cl().

◆ dt_supervisor_rekey()

void dt_supervisor_rekey ( uint64_t  old_hash,
uint64_t  new_hash 
)

Rekey: an object's hash changed in place (a pipeline cacheline rekeyed for reuse, or a history item overwritten so its parameter hash changed). Modelled as "delete old hash + add new hash": the old entry is marked alive == FALSE (emitting a delete with rekeyed_to), and the new entry inherits the old metadata and is created/revived (emitting a create with rekeyed_from). Domain-agnostic; the domain is derived from the old entry's facets.

Definition at line 1079 of file supervisor.c.

References _emit_line(), _entry_get_locked(), _hash_is_set(), _rekey_record(), _sv, dt_sv_entry_t::alive, dt_sv_entry_t::bb_bpp, dt_sv_entry_t::bb_h, dt_sv_entry_t::bb_w, dt_sv_entry_t::cl_name, dt_sv_entry_t::devid, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_supervisor_active(), DT_SV_CREATE, DT_SV_DELETE, dt_sv_entry_t::enabled, dt_sv_entry_t::facets, FALSE, dt_sv_entry_t::history_hash, dt_sv_entry_t::history_index, dt_sv_entry_t::imgid, dt_sv_entry_t::input_hash, dt_sv_entry_t::iop_order, dt_sv_entry_t::multi_name, dt_sv_entry_t::multi_priority, dt_sv_entry_t::node_hash, dt_sv_entry_t::op_name, dt_sv_entry_t::param_hash, dt_sv_entry_t::pipe_type, dt_sv_entry_t::roi_h, dt_sv_entry_t::roi_w, dt_sv_entry_t::size, and TRUE.

Referenced by _cache_try_rekey_reuse_locked(), dt_dev_add_history_item_ext(), and dt_dev_pixelpipe_cache_rekey().

◆ dt_supervisor_set_recording()

void dt_supervisor_set_recording ( const gboolean  on)

Definition at line 305 of file supervisor.c.

References dt_supervisor_recording.

Referenced by _on_destroy(), _on_record_toggled(), and dt_gui_supervisor_window_show().

◆ dt_supervisor_thumbnail()

void dt_supervisor_thumbnail ( dt_sv_op_t  op,
int32_t  imgid,
int  width,
int  height,
int  mip,
gboolean  success 
)

Thumbnail generation event — a thumbnail widget fetching its mipmap (and the pipeline render behind it, which surfaces through the generic node/cacheline/ backbuf events of the thumbnail pipe). Keyed by a synthetic (imgid, mip) key.

Definition at line 1195 of file supervisor.c.

References _emit_line(), _entry_get_locked(), _envelope(), _mipmap_key(), _set_hash_member(), _sv, _thumb_key(), _touch_alive_locked(), dt_sv_entry_t::alive, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_supervisor_active(), DT_SV_F_THUMB, dt_sv_entry_t::facets, height, dt_sv_entry_t::img_filename, dt_sv_entry_t::imgid, key, dt_sv_entry_t::mip, dt_sv_entry_t::roi_h, dt_sv_entry_t::roi_w, size, dt_sv_entry_t::thumb_success, and width.

Referenced by _view_image_get_surface_internal().

◆ dt_supervisor_thumbnail_key()

uint64_t dt_supervisor_thumbnail_key ( const int32_t  imgid,
const int  mip 
)

Definition at line 171 of file supervisor.c.

References _thumb_key().

◆ dt_supervisor_widget()

void dt_supervisor_widget ( dt_sv_op_t  op,
const char *  widget_tag,
uint64_t  consumed_hash,
int  pipe_type,
int32_t  imgid 
)

Widget paint event — declares the backbuf/cacheline hash the widget consumed. The module/history narrative is resolved from the registry memory.

Definition at line 1173 of file supervisor.c.

References _emit_line(), _envelope(), _resolve_locked(), _sv, dt_sv_entry_t::alive, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_supervisor_active(), DT_SV_F_WIDGET, dt_sv_entry_t::facets, FALSE, dt_sv_entry_t::param_hash, and TRUE.

Referenced by dt_dev_lock_pipe_surface().

Variable Documentation

◆ [struct]

◆ dt_supervisor_recording

gint dt_supervisor_recording = 0

Definition at line 112 of file supervisor.c.

Referenced by _emit_line(), dt_supervisor_active(), and dt_supervisor_set_recording().

◆ entries

◆ inited

gboolean inited

Definition at line 120 of file supervisor.c.

◆ lock

◆ log

◆ next_seq

uint64_t next_seq

Definition at line 118 of file supervisor.c.