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:
authorTon Roosendaal <ton@blender.org>2004-09-05 17:43:51 +0400
committerTon Roosendaal <ton@blender.org>2004-09-05 17:43:51 +0400
commitbf83f6ddd87a76d30339057118f23c5651f9eff4 (patch)
treed28c5dbec49a60b2060dda9f17f48d08b404f806 /source/blender/blenloader/intern/readfile.h
parent61e4707bdb6e9f64db0520c47f398d68e9322937 (diff)
Second itteration of global undo system. Now based on:
- file-to-memory save - incremental difference steps (compression) everthing has been tightly coded to use minimum of memcpy or allocs. In fact this system works with a single full buffer (=file) in memory, and undosteps as differences from it. Speed gain is factor 4-8 faster. I've added it in CTRL+ALT+T timer menu for a test. Please note the gain is especially in the undo-storing, not in retrieving undo. Also new: file read option to skip UI read (file menu). This now also is default for the undo system.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.h')
-rw-r--r--source/blender/blenloader/intern/readfile.h42
1 files changed, 12 insertions, 30 deletions
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index a052b940c7c..e198752f130 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -34,6 +34,7 @@
#define READFILE_H
struct OldNewMap;
+struct MemFile;
typedef struct FileData {
// linked list of BHeadN's
@@ -45,7 +46,9 @@ typedef struct FileData {
int (*read)(struct FileData *filedata, void *buffer, int size);
// variables needed for reading from memory / stream
- char * buffer;
+ char *buffer;
+ // variables needed for reading from memfile (undo)
+ struct MemFile *memfile;
// variables needed for reading from file
int filedes;
@@ -93,39 +96,18 @@ typedef struct BHeadN {
void blo_join_main(ListBase *mainlist);
void blo_split_main(ListBase *mainlist);
- BlendFileData*
-blo_read_file_internal(
- FileData *fd,
- BlendReadError *error_r);
+BlendFileData *blo_read_file_internal( FileData *fd, BlendReadError *error_r);
+FileData *blo_openblenderfile( char *name);
+FileData *blo_openblendermemory( void *buffer, int buffersize);
+FileData *blo_openblendermemfile(struct MemFile *memfile);
- FileData*
-blo_openblenderfile(
- char *name);
+void blo_freefiledata( FileData *fd);
- FileData*
-blo_openblendermemory(
- void *buffer,
- int buffersize);
- void
-blo_freefiledata(
- FileData *fd);
-
-
- BHead*
-blo_firstbhead(
- FileData *fd);
-
- BHead*
-blo_nextbhead(
- FileData *fd,
- BHead *thisblock);
-
- BHead*
-blo_prevbhead(
- FileData *fd,
- BHead *thisblock);
+BHead *blo_firstbhead(FileData *fd);
+BHead *blo_nextbhead(FileData *fd, BHead *thisblock);
+BHead *blo_prevbhead(FileData *fd, BHead *thisblock);
#endif