|
Blender
V2.59
|
#include <stddef.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "MEM_guardedalloc.h"#include "MEM_CacheLimiterC-Api.h"#include "DNA_sequence_types.h"#include "BKE_sequencer.h"#include "BLI_utildefines.h"#include "BLI_ghash.h"#include "BLI_mempool.h"#include <pthread.h>#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"Go to the source code of this file.
Classes | |
| struct | seqCacheKey |
| struct | seqCacheEntry |
Typedefs | |
| typedef struct seqCacheKey | seqCacheKey |
| typedef struct seqCacheEntry | seqCacheEntry |
Functions | |
| static unsigned int | HashHash (const void *key_) |
| static int | HashCmp (const void *a_, const void *b_) |
| static void | HashKeyFree (void *key) |
| static void | HashValFree (void *val) |
| static void | IMB_seq_cache_destructor (void *p) |
| void | seq_stripelem_cache_init (void) |
| void | seq_stripelem_cache_destruct (void) |
| void | seq_stripelem_cache_cleanup (void) |
| struct ImBuf * | seq_stripelem_cache_get (SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type) |
| void | seq_stripelem_cache_put (SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf *i) |
Variables | |
| static GHash * | hash = NULL |
| static MEM_CacheLimiterC * | limitor = NULL |
| static struct BLI_mempool * | entrypool = NULL |
| static struct BLI_mempool * | keypool = NULL |
| static int | ibufs_in = 0 |
| static int | ibufs_rem = 0 |
Definition in file seqcache.c.
| typedef struct seqCacheEntry seqCacheEntry |
| typedef struct seqCacheKey seqCacheKey |
| static int HashCmp | ( | const void * | a_, |
| const void * | b_ | ||
| ) | [static] |
Definition at line 81 of file seqcache.c.
References seqCacheKey::cfra, seqCacheKey::context, seqCacheKey::seq, seq_cmp_render_data(), and seqCacheKey::type.
Referenced by seq_stripelem_cache_cleanup(), and seq_stripelem_cache_init().
| static unsigned int HashHash | ( | const void * | key_ | ) | [static] |
Definition at line 69 of file seqcache.c.
References seqCacheKey::cfra, seqCacheKey::context, seqCacheKey::seq, seq_hash_render_data(), and seqCacheKey::type.
Referenced by seq_stripelem_cache_cleanup(), and seq_stripelem_cache_init().
| static void HashKeyFree | ( | void * | key | ) | [static] |
Definition at line 110 of file seqcache.c.
References BLI_mempool_free().
Referenced by seq_stripelem_cache_cleanup(), seq_stripelem_cache_destruct(), and seq_stripelem_cache_put().
| static void HashValFree | ( | void * | val | ) | [static] |
Definition at line 115 of file seqcache.c.
References BLI_mempool_free(), seqCacheEntry::c_handle, seqCacheEntry::ibuf, ibufs_rem, IMB_freeImBuf(), MEM_CacheLimiter_unmanage(), and NULL.
Referenced by seq_stripelem_cache_cleanup(), seq_stripelem_cache_destruct(), and seq_stripelem_cache_put().
| static void IMB_seq_cache_destructor | ( | void * | p | ) | [static] |
Definition at line 133 of file seqcache.c.
References seqCacheEntry::c_handle, seqCacheEntry::ibuf, ibufs_rem, IMB_freeImBuf(), and NULL.
Referenced by seq_stripelem_cache_init().
| void seq_stripelem_cache_cleanup | ( | void | ) |
Definition at line 168 of file seqcache.c.
References BLI_ghash_free(), BLI_ghash_new(), HashCmp(), HashHash(), HashKeyFree(), HashValFree(), and seq_stripelem_cache_init().
Referenced by free_imbuf_seq(), screen_render_exec(), and screen_render_invoke().
| void seq_stripelem_cache_destruct | ( | void | ) |
Definition at line 157 of file seqcache.c.
References BLI_ghash_free(), BLI_mempool_destroy(), delete_MEM_CacheLimiter(), HashKeyFree(), HashValFree(), and limitor.
Referenced by free_blender().
| struct ImBuf* seq_stripelem_cache_get | ( | SeqRenderData | context, |
| struct Sequence * | seq, | ||
| float | cfra, | ||
| seq_stripelem_ibuf_t | type | ||
| ) | [read] |
Definition at line 185 of file seqcache.c.
References BLI_ghash_lookup(), seqCacheEntry::c_handle, seqCacheKey::cfra, seqCacheKey::context, seqCacheEntry::ibuf, IMB_refImBuf(), MEM_CacheLimiter_touch(), NULL, seqCacheKey::seq, seq_stripelem_cache_init(), Sequence::start, and seqCacheKey::type.
Referenced by copy_from_ibuf_still(), seq_render_strip(), and seq_render_strip_stack().
| void seq_stripelem_cache_init | ( | void | ) |
Definition at line 148 of file seqcache.c.
References BLI_ghash_new(), BLI_mempool_create(), HashCmp(), HashHash(), IMB_seq_cache_destructor(), limitor, and new_MEM_CacheLimiter().
Referenced by seq_stripelem_cache_cleanup(), seq_stripelem_cache_get(), and seq_stripelem_cache_put().
| void seq_stripelem_cache_put | ( | SeqRenderData | context, |
| struct Sequence * | seq, | ||
| float | cfra, | ||
| seq_stripelem_ibuf_t | type, | ||
| struct ImBuf * | i | ||
| ) |
Definition at line 216 of file seqcache.c.
References BLI_ghash_insert(), BLI_ghash_remove(), BLI_mempool_alloc(), seqCacheEntry::c_handle, seqCacheKey::cfra, seqCacheKey::context, HashKeyFree(), HashValFree(), i, seqCacheEntry::ibuf, ibufs_in, IMB_refImBuf(), limitor, MEM_CacheLimiter_enforce_limits(), MEM_CacheLimiter_insert(), MEM_CacheLimiter_ref(), MEM_CacheLimiter_unref(), NULL, seqCacheKey::seq, seq_stripelem_cache_init(), Sequence::start, and seqCacheKey::type.
Referenced by copy_to_ibuf_still(), seq_render_strip(), and seq_render_strip_stack().
struct BLI_mempool* entrypool = NULL [static] |
Definition at line 64 of file seqcache.c.
Definition at line 62 of file seqcache.c.
Referenced by _ehash_insert(), _ehash_lookup(), _ehash_lookupWithPrev(), BLI_edgehash_insert(), BLI_edgehash_lookup_p(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_remove(), BLI_thread_srandom(), btAdjustInternalEdgeContacts(), btGetHash(), btHashString::btHashString(), detect_super_cols(), find_ordering(), btHashMap< btHashPtr, btPointerUid >::findIndex(), btHashedOverlappingPairCache::findPair(), HsiehHash(), btHashMap< btHashPtr, btPointerUid >::insert(), mesh_mirrtopo_table(), MirrTopo_item_sort(), newPerlin(), orgBlenderNoise(), phash_insert(), phash_lookup(), phash_next(), btConnectivityProcessor::processTriangle(), pyrna_set_to_enum_bitfield(), RE_make_stars(), btHashMap< btHashPtr, btPointerUid >::remove(), btHashedOverlappingPairCache::removeOverlappingPair(), rng_srandom(), sb_detect_aabb_collisionCached(), sb_detect_edge_collisionCached(), sb_detect_face_collisionCached(), sb_detect_face_pointCached(), sb_detect_vertex_collisionCached(), ui_popup_menu_memory(), and ui_popup_string_hash().
int ibufs_in = 0 [static] |
Definition at line 66 of file seqcache.c.
Referenced by seq_stripelem_cache_put().
int ibufs_rem = 0 [static] |
Definition at line 67 of file seqcache.c.
Referenced by HashValFree(), and IMB_seq_cache_destructor().
struct BLI_mempool* keypool = NULL [static] |
Definition at line 65 of file seqcache.c.
MEM_CacheLimiterC* limitor = NULL [static] |
Definition at line 63 of file seqcache.c.
Referenced by seq_stripelem_cache_destruct(), seq_stripelem_cache_init(), and seq_stripelem_cache_put().