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 common/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)
 
int dt_cache_seed (dt_cache_t *cache, const uint32_t key, const void *data, size_t data_size, size_t cost, gboolean aligned_alloc)
 
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,
  C 
)    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_seed()

◆ 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 _accels_tooltip_query_hook(), _active_modules_popup(), _backup_db(), _blendop_blendif_disp_alternative_reset(), _blendop_masks_all_name_edited(), _blendop_masks_all_toggled(), _blendop_masks_handler_callback(), _cache_entry_materialize_host_data_locked(), _color_picker_button_press(), _color_picker_button_release(), _color_picker_motion(), _completion_row_activated(), _create_background_clicked(), _create_layer_clicked(), _darkroom_image_loaded_callback(), _delete_child(), _delete_layer_clicked(), _develop_ui_pipe_finished_callback(), _dispatch_pending_tasks(), _edit_button_release(), _edit_key_press(), _edit_key_release(), _edit_preset_response(), _emit_first_sample_if_needed(), _event_process_after_preview_callback(), _event_structure_auto_clicked(), _fill_black_clicked(), _fill_transparent_clicked(), _fill_white_clicked(), _gpu_clear_buffer(), _gtk_main_quit_safe(), _history_compress_apply(), _history_paste_apply(), _history_paste_parts_apply(), _image_import_internal(), _lock_pipe_surface(), _log_arena_allocation_failure(), _metadata_get_flags(), _metadata_view_update_values(), _paint_emit_noop_cb(), _pause_worker(), _perform_runtime_widget_cache_sync(), _prepare_resampling_plan(), _preview_map(), _refresh_host_pinned_images_after_host_write(), _resume_worker(), _sample_gui(), _save_layer_clicked(), _splash_scale_factor_changed(), _stroke_flow_alpha(), _sync_params_from_gui(), _textview_focus_out(), _wait_worker_idle(), _widget_auto_model_row_changed(), _widget_auto_model_row_collapsed(), _widget_auto_model_row_deleted(), _widget_auto_model_row_expanded(), _widget_auto_model_row_inserted(), _widget_auto_model_rows_reordered(), _widget_auto_on_buffer_changed(), _widget_auto_on_model_changed(), _widget_auto_text_buffer_changed(), camera_autosearch_clicked(), camera_menusearch_clicked(), cleanup_pipe(), color_picker_apply(), commit_params(), delete_children(), dt_cache_remove(), dt_control_save_xmps(), dt_dev_cleanup(), dt_dev_free_history_item(), dt_dev_history_item_update_from_params(), dt_dev_pixelpipe_cache_flush_host_pinned_image(), dt_dev_pixelpipe_cache_get_pinned_image(), dt_dev_pixelpipe_cache_put_pinned_image(), dt_dev_pixelpipe_cache_resync_host_pinned_image(), dt_dev_pixelpipe_cleanup(), dt_dev_pixelpipe_process(), dt_drawlayer_paint_finalize_path(), 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(), try_enter(), write_image(), write_image(), and write_pfm().