![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Go to the source code of this file.
Data Structures | |
struct | dt_mipmap_buffer_t |
struct | dt_mipmap_cache_one_t |
struct | dt_mipmap_cache_t |
Macros | |
#define | dt_mipmap_cache_get(A, B, C, D, E, F) dt_mipmap_cache_get_with_caller(A,B,C,D,E,F,__FILE__,__LINE__) |
#define | dt_mipmap_cache_write_get(A, B, C, D) dt_mipmap_cache_write_get_with_caller(A,B,C,D,__FILE__,__LINE__) |
#define | dt_mipmap_cache_release(A, B) dt_mipmap_cache_release_with_caller(A, B, __FILE__, __LINE__) |
Typedefs | |
typedef enum dt_mipmap_size_t | dt_mipmap_size_t |
typedef enum dt_mipmap_get_flags_t | dt_mipmap_get_flags_t |
typedef struct dt_mipmap_buffer_t | dt_mipmap_buffer_t |
typedef struct dt_mipmap_cache_one_t | dt_mipmap_cache_one_t |
typedef struct dt_mipmap_cache_t | dt_mipmap_cache_t |
Enumerations | |
enum | dt_mipmap_size_t { DT_MIPMAP_0 , DT_MIPMAP_1 , DT_MIPMAP_2 , DT_MIPMAP_3 , DT_MIPMAP_4 , DT_MIPMAP_5 , DT_MIPMAP_6 , DT_MIPMAP_7 , DT_MIPMAP_8 , DT_MIPMAP_F , DT_MIPMAP_FULL , DT_MIPMAP_NONE } |
enum | dt_mipmap_get_flags_t { DT_MIPMAP_BLOCKING = 0 , DT_MIPMAP_TESTLOCK = 1 } |
#define dt_mipmap_cache_get | ( | A, | |
B, | |||
C, | |||
D, | |||
E, | |||
F | |||
) | dt_mipmap_cache_get_with_caller(A,B,C,D,E,F,__FILE__,__LINE__) |
#define dt_mipmap_cache_release | ( | A, | |
B | |||
) | dt_mipmap_cache_release_with_caller(A, B, __FILE__, __LINE__) |
#define dt_mipmap_cache_write_get | ( | A, | |
B, | |||
C, | |||
D | |||
) | dt_mipmap_cache_write_get_with_caller(A,B,C,D,__FILE__,__LINE__) |
typedef struct dt_mipmap_buffer_t dt_mipmap_buffer_t |
typedef struct dt_mipmap_cache_one_t dt_mipmap_cache_one_t |
typedef struct dt_mipmap_cache_t dt_mipmap_cache_t |
typedef enum dt_mipmap_get_flags_t dt_mipmap_get_flags_t |
typedef enum dt_mipmap_size_t dt_mipmap_size_t |
enum dt_mipmap_size_t |
void dt_mimap_cache_evict | ( | dt_mipmap_cache_t * | cache, |
const int32_t | imgid | ||
) |
References _get_cache(), dt_cache_remove(), DT_MIPMAP_0, DT_MIPMAP_F, and get_key().
Referenced by generate_thumbnail_cache(), and preload_image_cache().
void * dt_mipmap_cache_alloc | ( | dt_mipmap_buffer_t * | buf, |
const dt_image_t * | img | ||
) |
References _get_buffer_from_dsc(), _get_entry_size(), ASAN_POISON_MEMORY_REGION, ASAN_UNPOISON_MEMORY_REGION, bpp, dt_mipmap_buffer_t::buf, dt_image_t::buf_dsc, dt_mipmap_buffer_t::cache_entry, dt_cache_entry_t::data, dt_cache_entry_t::data_size, dt_alloc_align, dt_free_align, dt_iop_buffer_dsc_to_bpp(), dt_mipmap_cache_update_buffer_addresses(), DT_MIPMAP_FULL, dt_image_t::filename, dt_image_t::height, MAX, dt_mipmap_buffer_dsc::size, dt_mipmap_buffer_t::size, and dt_image_t::width.
Referenced by dt_imageio_open_avif(), dt_imageio_open_exr(), dt_imageio_open_heif(), dt_imageio_open_j2k(), dt_imageio_open_jpeg(), dt_imageio_open_pfm(), dt_imageio_open_png(), dt_imageio_open_pnm(), dt_imageio_open_rawspeed(), dt_imageio_open_rawspeed_sraw(), dt_imageio_open_rgbe(), dt_imageio_open_tiff(), and dt_imageio_open_webp().
void dt_mipmap_cache_cleanup | ( | dt_mipmap_cache_t * | cache | ) |
References dt_mipmap_cache_one_t::cache, dt_cache_cleanup(), dt_mipmap_cache_print(), dt_mipmap_cache_t::mip_f, dt_mipmap_cache_t::mip_full, and dt_mipmap_cache_t::mip_thumbs.
Referenced by dt_cleanup().
void dt_mipmap_cache_copy_thumbnails | ( | const dt_mipmap_cache_t * | cache, |
const uint32_t | dst_imgid, | ||
const uint32_t | src_imgid | ||
) |
References _write_mipmap_to_disk(), dt_mipmap_cache_t::cachedir, DT_MIPMAP_0, DT_MIPMAP_F, and PATH_MAX.
Referenced by dt_image_copy_rename().
dt_mipmap_size_t dt_mipmap_cache_get_matching_size | ( | const dt_mipmap_cache_t * | cache, |
const int32_t | width, | ||
const int32_t | height | ||
) |
References DT_DEBUG_IMAGEIO, DT_MIPMAP_0, DT_MIPMAP_F, dt_print(), height, dt_mipmap_cache_t::max_height, dt_mipmap_cache_t::max_width, and width.
Referenced by _draw_image(), and dt_view_image_get_surface().
void dt_mipmap_cache_get_with_caller | ( | dt_mipmap_cache_t * | cache, |
dt_mipmap_buffer_t * | buf, | ||
const int32_t | imgid, | ||
const dt_mipmap_size_t | mip, | ||
const dt_mipmap_get_flags_t | flags, | ||
const char | mode, | ||
const char * | file, | ||
int | line | ||
) |
References _generate_blocking(), _get_cache(), _get_dsc_from_entry(), _invalidate_buffer(), dt_cache_entry_t::_lock_demoting, _validate_buffer(), dt_mipmap_buffer_t::cache_entry, dt_cache_get, dt_cache_get_with_caller(), dt_cache_release, dt_cache_testget(), DT_MIPMAP_0, DT_MIPMAP_BLOCKING, DT_MIPMAP_TESTLOCK, flags, get_key(), dt_mipmap_buffer_t::imgid, key, dt_cache_entry_t::lock, and dt_mipmap_buffer_t::size.
Referenced by dt_mipmap_cache_write_get_with_caller().
void dt_mipmap_cache_init | ( | dt_mipmap_cache_t * | cache | ) |
References _get_entry_size(), dt_mipmap_cache_t::buffer_size, dt_mipmap_cache_one_t::cache, dt_mipmap_cache_t::cachedir, darktable, dt_cache_init(), dt_cache_set_allocate_callback(), dt_cache_set_cleanup_callback(), DT_CTL_WORKER_RESERVED, dt_get_mipmap_mem(), DT_MIPMAP_2, dt_mipmap_cache_allocate_dynamic(), dt_mipmap_cache_deallocate_dynamic(), dt_mipmap_cache_get_filename(), DT_MIPMAP_F, DT_MIPMAP_FULL, dt_mipmap_cache_t::max_height, dt_mipmap_cache_t::max_width, dt_mipmap_cache_t::mip_f, dt_mipmap_cache_t::mip_full, dt_mipmap_cache_t::mip_thumbs, darktable_t::num_openmp_threads, dt_mipmap_cache_one_t::stats_fetches, dt_mipmap_cache_one_t::stats_misses, dt_mipmap_cache_one_t::stats_near_match, dt_mipmap_cache_one_t::stats_requests, and dt_mipmap_cache_one_t::stats_standin.
Referenced by dt_init().
void dt_mipmap_cache_print | ( | dt_mipmap_cache_t * | cache | ) |
References dt_mipmap_cache_one_t::cache, dt_cache_t::cost, dt_cache_t::cost_quota, dt_mipmap_cache_t::mip_f, dt_mipmap_cache_t::mip_full, dt_mipmap_cache_t::mip_thumbs, dt_mipmap_cache_one_t::stats_fetches, dt_mipmap_cache_one_t::stats_misses, dt_mipmap_cache_one_t::stats_near_match, dt_mipmap_cache_one_t::stats_requests, and dt_mipmap_cache_one_t::stats_standin.
Referenced by dt_mipmap_cache_cleanup().
void dt_mipmap_cache_release_with_caller | ( | dt_mipmap_cache_t * | cache, |
dt_mipmap_buffer_t * | buf, | ||
const char * | file, | ||
int | line | ||
) |
void dt_mipmap_cache_remove | ( | dt_mipmap_cache_t * | cache, |
const int32_t | imgid, | ||
const gboolean | flush_disk | ||
) |
References DT_MIPMAP_0, dt_mipmap_cache_remove_at_size(), and DT_MIPMAP_F.
Referenced by _image_import_internal(), _jpg_combobox_changed(), clear_image_cache(), drop_cache(), dt_dev_write_history_ext(), dt_film_remove(), dt_history_delete_on_image_ext(), dt_history_load_and_apply(), dt_image_flip(), dt_image_remove(), dt_image_set_flip(), and dt_styles_apply_to_image().
void dt_mipmap_cache_remove_at_size | ( | dt_mipmap_cache_t * | cache, |
const int32_t | imgid, | ||
const dt_mipmap_size_t | mip, | ||
const gboolean | flush_disk | ||
) |
References _get_cache(), _get_dsc_from_entry(), ASAN_UNPOISON_MEMORY_REGION, dt_cache_release, dt_cache_remove(), dt_cache_testget(), DT_MIPMAP_0, DT_MIPMAP_BUFFER_DSC_FLAG_INVALIDATE, dt_mipmap_cache_unlink_ondisk_thumbnail(), DT_MIPMAP_F, dt_mipmap_buffer_dsc::flags, get_key(), and key.
Referenced by dt_mipmap_cache_remove().
void dt_mipmap_cache_write_get_with_caller | ( | dt_mipmap_cache_t * | cache, |
dt_mipmap_buffer_t * | buf, | ||
const int32_t | imgid, | ||
const int | mip, | ||
const char * | file, | ||
int | line | ||
) |
References DT_MIPMAP_BLOCKING, and dt_mipmap_cache_get_with_caller().