Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-07-03 12:36:27 +0300
committerBastien Montagne <bastien@blender.org>2020-07-03 13:56:21 +0300
commit5fa6bd8a8ddbd13ef58d127546af2f57d1905be4 (patch)
treeea667c7a746f71fcabb0e25e626dc6b520cc1591 /source/blender/blenloader/intern/readfile.h
parent6cb796e98e63aa859f5de762e4d542debfd932eb (diff)
Readfile/Undo: initial refactor of cache preservation code.
Main goal here is to have better specificity using cache keys, to avoid same memroy address being re-used messing up with cache pointers restoration after undo had to re-read a data-block. Once all caches handling are ported to this new system, it should fix random issues like the one reported in T76989. Part of D8183, refactoring how we preserve caches across undo steps in readfile code.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.h')
-rw-r--r--source/blender/blenloader/intern/readfile.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index f698d642e33..57c86f7128c 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -30,6 +30,7 @@
#include "DNA_windowmanager_types.h" /* for ReportType */
#include "zlib.h"
+struct BLOCacheStorage;
struct GSet;
struct IDNameLib_Map;
struct Key;
@@ -121,6 +122,7 @@ typedef struct FileData {
struct OldNewMap *soundmap;
struct OldNewMap *volumemap;
struct OldNewMap *packedmap;
+ struct BLOCacheStorage *cache_storage;
struct BHeadSort *bheadmap;
int tot_bheadmap;
@@ -167,6 +169,10 @@ void blo_end_packed_pointer_map(FileData *fd, struct Main *oldmain);
void blo_add_library_pointer_map(ListBase *old_mainlist, FileData *fd);
void blo_make_old_idmap_from_main(FileData *fd, struct Main *bmain);
+void blo_cache_storage_init(FileData *fd, struct Main *bmain);
+void blo_cache_storage_old_bmain_clear(FileData *fd, struct Main *bmain_old);
+void blo_cache_storage_end(FileData *fd);
+
void blo_filedata_free(FileData *fd);
BHead *blo_bhead_first(FileData *fd);