Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/filelist.cc
| Show First 20 Lines • Show All 1,636 Lines • ▼ Show 20 Lines | static void filelist_cache_init(FileListEntryCache *cache, size_t cache_size) | ||||
| cache->uids = BLI_ghash_new_ex( | cache->uids = BLI_ghash_new_ex( | ||||
| BLI_ghashutil_inthash_p, BLI_ghashutil_intcmp, __func__, cache_size * 2); | BLI_ghashutil_inthash_p, BLI_ghashutil_intcmp, __func__, cache_size * 2); | ||||
| cache->size = cache_size; | cache->size = cache_size; | ||||
| cache->flags = FLC_IS_INIT; | cache->flags = FLC_IS_INIT; | ||||
| cache->previews_todo_count = 0; | cache->previews_todo_count = 0; | ||||
| /* We cannot translate from non-main thread, so init translated strings once from here. */ | |||||
| IMB_thumb_ensure_translations(); | |||||
| } | } | ||||
| static void filelist_cache_free(FileListEntryCache *cache) | static void filelist_cache_free(FileListEntryCache *cache) | ||||
| { | { | ||||
| if (!(cache->flags & FLC_IS_INIT)) { | if (!(cache->flags & FLC_IS_INIT)) { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,301 Lines • Show Last 20 Lines | |||||