Color management: remove unused code
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 5 Jul 2012 09:41:07 +0000 (09:41 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 5 Jul 2012 09:41:07 +0000 (09:41 +0000)
source/blender/imbuf/IMB_moviecache.h
source/blender/imbuf/intern/moviecache.c

index 0c37ab0adf3ad1c4a2fd9bafd6c609cd4fd89203..d1d34a01433593043f8062a4369912053f996db8 100644 (file)
@@ -43,8 +43,6 @@ struct ImBuf;
 struct MovieCache;
 
 typedef void (*MovieCacheGetKeyDataFP) (void *userkey, int *framenr, int *proxy, int *render_flags);
-typedef void (*MovieCacheKeyDeleterFP) (void *userkey);
-typedef int (*MovieCacheCheckKeyUnusedFP) (void *userkey);
 
 typedef void  *(*MovieCacheGetPriorityDataFP) (void *userkey);
 typedef int    (*MovieCacheGetItemPriorityFP) (void *last_userkey, void *priority_data);
@@ -54,9 +52,7 @@ void IMB_moviecache_init(void);
 void IMB_moviecache_destruct(void);
 
 struct MovieCache *IMB_moviecache_create(const char *name, int keysize, GHashHashFP hashfp, GHashCmpFP cmpfp);
-void IMB_moviecache_set_key_deleter_callback(struct MovieCache *cache, MovieCacheKeyDeleterFP keydeleterfp);
 void IMB_moviecache_set_getdata_callback(struct MovieCache *cache, MovieCacheGetKeyDataFP getdatafp);
-void IMB_moviecache_set_check_unused_callback(struct MovieCache *cache, MovieCacheCheckKeyUnusedFP checkkeyunusedfp);
 void IMB_moviecache_set_priority_callback(struct MovieCache *cache, MovieCacheGetPriorityDataFP getprioritydatafp,
                                           MovieCacheGetItemPriorityFP getitempriorityfp,
                                           MovieCachePriorityDeleterFP prioritydeleterfp);
index 43e681591aa69531c14f9e503b6f6c7515817be7..e398d1c7b161c1c9f83c8fe173b3cf3ac917516d 100644 (file)
@@ -63,11 +63,9 @@ typedef struct MovieCache {
        char name[64];
 
        GHash *hash;
-       MovieCacheKeyDeleterFP keydeleterfp;
        GHashHashFP hashfp;
        GHashCmpFP cmpfp;
        MovieCacheGetKeyDataFP getdatafp;
-       MovieCacheCheckKeyUnusedFP checkkeyunusedfp;
 
        MovieCacheGetPriorityDataFP getprioritydatafp;
        MovieCacheGetItemPriorityFP getitempriorityfp;
@@ -116,10 +114,6 @@ static void moviecache_keyfree(void *val)
 {
        MovieCacheKey *key = (MovieCacheKey *)val;
 
-       if (key->cache_owner->keydeleterfp) {
-               key->cache_owner->keydeleterfp(key->userkey);
-       }
-
        BLI_mempool_free(key->cache_owner->userkeys_pool, key->userkey);
 
        BLI_mempool_free(key->cache_owner->keys_pool, key);
@@ -161,13 +155,6 @@ static void check_unused_keys(MovieCache *cache)
                if (remove)
                        PRINT("%s: cache '%s' remove item %p without buffer\n", __func__, cache->name, item);
 
-               if (!remove && cache->checkkeyunusedfp) {
-                       remove = cache->checkkeyunusedfp(key->userkey);
-
-                       if (remove)
-                               PRINT("%s: cache '%s' remove unused item %p\n", __func__, cache->name, item);
-               }
-
                if (remove)
                        BLI_ghash_remove(cache->hash, key, moviecache_keyfree, moviecache_valfree);
        }
@@ -299,21 +286,11 @@ MovieCache *IMB_moviecache_create(const char *name, int keysize, GHashHashFP has
        return cache;
 }
 
-void IMB_moviecache_set_key_deleter_callback(MovieCache *cache, MovieCacheKeyDeleterFP keydeleterfp)
-{
-       cache->keydeleterfp = keydeleterfp;
-}
-
 void IMB_moviecache_set_getdata_callback(MovieCache *cache, MovieCacheGetKeyDataFP getdatafp)
 {
        cache->getdatafp = getdatafp;
 }
 
-void IMB_moviecache_set_check_unused_callback(MovieCache *cache, MovieCacheCheckKeyUnusedFP checkkeyunusedfp)
-{
-       cache->checkkeyunusedfp = checkkeyunusedfp;
-}
-
 void IMB_moviecache_set_priority_callback(struct MovieCache *cache, MovieCacheGetPriorityDataFP getprioritydatafp,
                                           MovieCacheGetItemPriorityFP getitempriorityfp,
                                           MovieCachePriorityDeleterFP prioritydeleterfp)