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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-05 16:36:18 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-05 16:50:17 +0400
commit45507319635a0351d3c5010d75c32e40bf211d25 (patch)
tree909a5c2cf0816630bbe166de46d8e23d573db09d /source/blender/makesrna/intern/rna_internal.h
parentcb0520f79a7a2babd4c4a4f0d075c0d289b2a2f0 (diff)
RNA: optimization to avoid malloc for iterators.
This mostly helps making Cycles scene synchronization a bit faster.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index d75ee256cb1..ecfb7f5e5f5 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -355,35 +355,12 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point
/* Iterators */
-typedef int (*IteratorSkipFunc)(struct CollectionPropertyIterator *iter, void *data);
-
-typedef struct ListBaseIterator {
- Link *link;
- int flag;
- IteratorSkipFunc skip;
-} ListBaseIterator;
-
void rna_iterator_listbase_begin(struct CollectionPropertyIterator *iter, struct ListBase *lb, IteratorSkipFunc skip);
void rna_iterator_listbase_next(struct CollectionPropertyIterator *iter);
void *rna_iterator_listbase_get(struct CollectionPropertyIterator *iter);
void rna_iterator_listbase_end(struct CollectionPropertyIterator *iter);
PointerRNA rna_listbase_lookup_int(PointerRNA *ptr, StructRNA *type, struct ListBase *lb, int index);
-typedef struct ArrayIterator {
- char *ptr;
- char *endptr; /* past the last valid pointer, only for comparisons, ignores skipped values */
- void *free_ptr; /* will be freed if set */
- int itemsize;
-
- /* array length with no skip functions applied, take care not to compare against index from animsys
- * or python indices */
- int length;
-
- /* optional skip function, when set the array as viewed by rna can contain only a subset of the members.
- * this changes indices so quick array index lookups are not possible when skip function is used. */
- IteratorSkipFunc skip;
-} ArrayIterator;
-
void rna_iterator_array_begin(struct CollectionPropertyIterator *iter, void *ptr, int itemsize, int length,
bool free_ptr, IteratorSkipFunc skip);
void rna_iterator_array_next(struct CollectionPropertyIterator *iter);