From 334b05741f0ed51f192c17328b62c7540970d1bf Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 5 Feb 2006 19:23:34 +0000 Subject: * Add memcache limitor-support to imbufs * Add ffmpeg-read support in anim.c and util.c * Makes ImBufs refcountable. You can now increase an internal refcounter in ImBufs (using IMB_refImBuf) which is decreased by freeImBuf. This makes it possible to simply pass ImBuf pointers around in the sequencer saving a few memcopies. --- source/blender/imbuf/IMB_imbuf.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source/blender/imbuf/IMB_imbuf.h') diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index ae7a7f527f1..e78ee5901e9 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -174,6 +174,28 @@ struct ImBuf *IMB_allocImBuf(short x, short y, unsigned char d, unsigned int flags, unsigned char bitmap); +/** + * + * Increase reference count to imbuf + * (to delete an imbuf you have to call freeImBuf as many times as it + * is referenced) + * + * @attention Defined in allocimbuf.c + */ + +void IMB_refImBuf(struct ImBuf * ibuf); + +/** + * + * @attention Defined in allocimbuf.c + */ +void IMB_cache_limiter_insert(struct ImBuf * i); +void IMB_cache_limiter_unmanage(struct ImBuf * i); +void IMB_cache_limiter_touch(struct ImBuf * i); +void IMB_cache_limiter_ref(struct ImBuf * i); +void IMB_cache_limiter_unref(struct ImBuf * i); +int IMB_cache_limiter_get_refcount(struct ImBuf * i); + /** * * @attention Defined in allocimbuf.c -- cgit v1.2.3