Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/filelist.c
| Show First 20 Lines • Show All 1,311 Lines • ▼ Show 20 Lines | static void filelist_cache_init(FileListEntryCache *cache, size_t cache_size) | ||||
| cache->misc_cursor = 0; | cache->misc_cursor = 0; | ||||
| /* XXX This assumes uint is 32 bits and uuid is 128 bits (char[16]), be careful! */ | /* XXX This assumes uint is 32 bits and uuid is 128 bits (char[16]), be careful! */ | ||||
| cache->uuids = BLI_ghash_new_ex( | cache->uuids = BLI_ghash_new_ex( | ||||
| BLI_ghashutil_uinthash_v4_p, BLI_ghashutil_uinthash_v4_cmp, __func__, cache_size * 2); | BLI_ghashutil_uinthash_v4_p, BLI_ghashutil_uinthash_v4_cmp, __func__, cache_size * 2); | ||||
| cache->size = cache_size; | cache->size = cache_size; | ||||
| cache->flags = FLC_IS_INIT; | cache->flags = FLC_IS_INIT; | ||||
| /* 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) | ||||
| { | { | ||||
| FileDirEntry *entry, *entry_next; | FileDirEntry *entry, *entry_next; | ||||
| if (!(cache->flags & FLC_IS_INIT)) { | if (!(cache->flags & FLC_IS_INIT)) { | ||||
| return; | return; | ||||
| ▲ Show 20 Lines • Show All 1,611 Lines • Show Last 20 Lines | |||||