Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
cache.h File Reference
#include "common/dtpthread.h"
#include <glib.h>
#include <inttypes.h>
#include <stddef.h>
+ Include dependency graph for cache.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_cache_entry_t
 
struct  dt_cache_t
 

Macros

#define dt_cache_get(A, B, C)   dt_cache_get_with_caller(A, B, C, __FILE__, __LINE__)
 
#define dt_cache_release(A, B)   dt_cache_release_with_caller(A, B, __FILE__, __LINE__)
 

Typedefs

typedef struct dt_cache_entry_t dt_cache_entry_t
 
typedef struct dt_cache_t dt_cache_t
 

Functions

typedef void ((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
 
void dt_cache_init (dt_cache_t *cache, size_t entry_size, size_t cost_quota)
 
void dt_cache_cleanup (dt_cache_t *cache)
 
static void dt_cache_set_allocate_callback (dt_cache_t *cache, dt_cache_allocate_t allocate_cb, void *allocate_data)
 
static void dt_cache_set_cleanup_callback (dt_cache_t *cache, dt_cache_cleanup_t cleanup_cb, void *cleanup_data)
 
dt_cache_entry_tdt_cache_get_with_caller (dt_cache_t *cache, const uint32_t key, char mode, const char *file, int line)
 
dt_cache_entry_tdt_cache_testget (dt_cache_t *cache, const uint32_t key, char mode)
 
void dt_cache_release_with_caller (dt_cache_t *cache, dt_cache_entry_t *entry, const char *file, int line)
 
int32_t dt_cache_contains (dt_cache_t *cache, const uint32_t key)
 
int32_t dt_cache_remove (dt_cache_t *cache, const uint32_t key)
 
void dt_cache_gc (dt_cache_t *cache, const float fill_ratio)
 
int dt_cache_for_all (dt_cache_t *cache, int(*process)(const uint32_t key, const void *data, void *user_data), void *user_data)
 

Macro Definition Documentation

◆ dt_cache_get

#define dt_cache_get (   A,
  B,
 
)    dt_cache_get_with_caller(A, B, C, __FILE__, __LINE__)

◆ dt_cache_release

#define dt_cache_release (   A,
  B 
)    dt_cache_release_with_caller(A, B, __FILE__, __LINE__)

Typedef Documentation

◆ dt_cache_entry_t

◆ dt_cache_t

typedef struct dt_cache_t dt_cache_t

Function Documentation

◆ dt_cache_cleanup()

◆ dt_cache_contains()

int32_t dt_cache_contains ( dt_cache_t cache,
const uint32_t  key 
)

◆ dt_cache_for_all()

int dt_cache_for_all ( dt_cache_t cache,
int(*)(const uint32_t key, const void *data, void *user_data)  process,
void user_data 
)

◆ dt_cache_gc()

◆ dt_cache_get_with_caller()

◆ dt_cache_init()

◆ dt_cache_release_with_caller()

void dt_cache_release_with_caller ( dt_cache_t cache,
dt_cache_entry_t entry,
const char *  file,
int  line 
)

◆ dt_cache_remove()

◆ dt_cache_set_allocate_callback()

static void dt_cache_set_allocate_callback ( dt_cache_t cache,
dt_cache_allocate_t  allocate_cb,
void allocate_data 
)
inlinestatic

◆ dt_cache_set_cleanup_callback()

static void dt_cache_set_cleanup_callback ( dt_cache_t cache,
dt_cache_cleanup_t  cleanup_cb,
void cleanup_data 
)
inlinestatic

◆ dt_cache_testget()

◆ void()

typedef void ( (*)(void *userdata, dt_cache_entry_t *entry)  dt_cache_allocate_t)

Referenced by _backup_db(), _blendop_blendif_disp_alternative_reset(), _brush_duplicate_points(), _circle_duplicate_points(), _circle_events_post_expose(), _circle_get_distance(), _circle_get_points(), _circle_get_points_source(), _delete_child(), _edit_preset_response(), _ellipse_duplicate_points(), _ellipse_events_post_expose(), _ellipse_get_distance(), _event_process_after_preview_callback(), _event_structure_auto_clicked(), _gradient_duplicate_points(), _gradient_events_post_expose(), _gradient_get_distance(), _gradient_get_points_border(), _image_import_internal(), _metadata_get_flags(), _metadata_view_update_values(), _path_duplicate_points(), _prepare_resampling_plan(), camera_autosearch_clicked(), camera_menusearch_clicked(), commit_params(), delete_children(), dt_cache_remove(), dt_dev_add_history_item_ext(), dt_dev_cleanup(), dt_dev_free_history_item(), dt_dev_pixelpipe_cleanup(), dt_dev_pixelpipe_process(), dt_gui_preferences_show(), dt_image_read_duplicates(), dt_imageio_jpeg_decompress(), dt_imageio_jpeg_read(), dt_imageio_open_avif(), dt_imageio_open_j2k(), dt_imageio_open_jpeg(), dt_imageio_open_png(), dt_imageio_open_rawspeed(), dt_imageio_open_tiff(), dt_init(), dt_iop_alloc_image_buffers(), dt_set_signal_handlers(), gui_init(), gui_init(), icuLoadCollation(), icuRegexpFunc(), init_pipe(), key_swap_callback(), leave(), lens_autosearch_clicked(), lens_comboentry_aperture_update(), lens_comboentry_distance_update(), lens_comboentry_focal_update(), lens_menusearch_clicked(), line_detect(), read_image(), sqlite3IcuInit(), write_image(), write_image(), and write_pfm().