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:
Diffstat (limited to 'source/blender/imbuf/intern/allocimbuf.c')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c59
1 files changed, 3 insertions, 56 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 6ce6c9409d1..1d82c862dbd 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -1,7 +1,6 @@
/*
* allocimbuf.c
*
- * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -165,8 +164,9 @@ void IMB_freeImBuf(ImBuf *ibuf)
IMB_freezbufImBuf(ibuf);
IMB_freezbuffloatImBuf(ibuf);
freeencodedbufferImBuf(ibuf);
- IMB_cache_limiter_unmanage(ibuf);
IMB_metadata_free(ibuf);
+ if (ibuf->dds_data.data != NULL)
+ free(ibuf->dds_data.data);
MEM_freeN(ibuf);
}
}
@@ -468,60 +468,7 @@ static MEM_CacheLimiterC **get_imbuf_cache_limiter(void)
static MEM_CacheLimiterC *c = NULL;
if(!c)
- c = new_MEM_CacheLimiter(imbuf_cache_destructor);
+ c = new_MEM_CacheLimiter(imbuf_cache_destructor, NULL);
return &c;
}
-
-void IMB_free_cache_limiter(void)
-{
- delete_MEM_CacheLimiter(*get_imbuf_cache_limiter());
- *get_imbuf_cache_limiter() = NULL;
-}
-
-void IMB_cache_limiter_insert(ImBuf *i)
-{
- if(!i->c_handle) {
- i->c_handle = MEM_CacheLimiter_insert(
- *get_imbuf_cache_limiter(), i);
- MEM_CacheLimiter_ref(i->c_handle);
- MEM_CacheLimiter_enforce_limits(
- *get_imbuf_cache_limiter());
- MEM_CacheLimiter_unref(i->c_handle);
- }
-}
-
-void IMB_cache_limiter_unmanage(ImBuf *i)
-{
- if(i->c_handle) {
- MEM_CacheLimiter_unmanage(i->c_handle);
- i->c_handle = NULL;
- }
-}
-
-void IMB_cache_limiter_touch(ImBuf *i)
-{
- if(i->c_handle)
- MEM_CacheLimiter_touch(i->c_handle);
-}
-
-void IMB_cache_limiter_ref(ImBuf *i)
-{
- if(i->c_handle)
- MEM_CacheLimiter_ref(i->c_handle);
-}
-
-void IMB_cache_limiter_unref(ImBuf *i)
-{
- if(i->c_handle)
- MEM_CacheLimiter_unref(i->c_handle);
-}
-
-int IMB_cache_limiter_get_refcount(ImBuf *i)
-{
- if(i->c_handle)
- return MEM_CacheLimiter_get_refcount(i->c_handle);
-
- return 0;
-}
-