Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_memarena.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "IMB_filetype.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "imbuf.h"
Go to the source code of this file.
Classes | |
struct | ImGlobalTile |
struct | ImThreadTile |
struct | ImThreadTileCache |
struct | ImGlobalTileCache |
Local Structs | |
#define | IB_THREAD_CACHE_SIZE 100 |
typedef struct ImGlobalTile | ImGlobalTile |
typedef struct ImThreadTile | ImThreadTile |
typedef struct ImThreadTileCache | ImThreadTileCache |
typedef struct ImGlobalTileCache | ImGlobalTileCache |
static ImGlobalTileCache | GLOBAL_CACHE |
typedef struct ImGlobalTile ImGlobalTile |
typedef struct ImGlobalTileCache ImGlobalTileCache |
typedef struct ImThreadTile ImThreadTile |
typedef struct ImThreadTileCache ImThreadTileCache |
unsigned int* IMB_gettile | ( | ImBuf * | ibuf, |
int | tx, | ||
int | ty, | ||
int | thread | ||
) |
Definition at line 421 of file cache.c.
References GLOBAL_CACHE, imb_thread_cache_get_tile(), and ImGlobalTileCache::thread_cache.
|
static |
Definition at line 274 of file cache.c.
References BLI_addhead(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_remove(), BLI_memarena_alloc(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_remlink(), ListBase::first, GLOBAL_CACHE, ImGlobalTile::ibuf, imb_global_cache_tile_load(), imb_global_cache_tile_unload(), ListBase::last, ImGlobalTile::loading, ImGlobalTileCache::maxmem, ImGlobalTileCache::memarena, ImGlobalTileCache::mutex, NULL, ImGlobalTile::prev, ImGlobalTile::refcount, ImGlobalTileCache::tilehash, ImGlobalTileCache::tiles, ImBuf::tilex, ImBuf::tiley, ImGlobalTileCache::totmem, ImGlobalTile::tx, ImGlobalTile::ty, and ImGlobalTileCache::unused.
Referenced by imb_thread_cache_get_tile(), and IMB_tiles_to_rect().
|
static |
Definition at line 120 of file cache.c.
References ImGlobalTile::ibuf, imb_loadtile(), MEM_callocN, ImBuf::tiles, ImBuf::tilex, ImBuf::tiley, ImGlobalTile::tx, ImGlobalTile::ty, and ImBuf::xtiles.
Referenced by imb_global_cache_get_tile().
|
static |
Definition at line 131 of file cache.c.
References GLOBAL_CACHE, ImGlobalTile::ibuf, MEM_freeN, NULL, ImBuf::tiles, ImBuf::tilex, ImBuf::tiley, ImGlobalTileCache::totmem, ImGlobalTile::tx, ImGlobalTile::ty, and ImBuf::xtiles.
Referenced by imb_global_cache_get_tile(), and imb_tile_cache_exit().
Definition at line 91 of file cache.c.
References Freestyle::a, and usdtokens::b().
Referenced by IMB_tile_cache_params().
|
static |
Definition at line 84 of file cache.c.
References ImGlobalTile::ibuf, ImGlobalTile::tx, and ImGlobalTile::ty.
Referenced by IMB_tile_cache_params().
|
static |
Definition at line 190 of file cache.c.
References BLI_ghash_free(), NULL, and ImThreadTileCache::tilehash.
Referenced by imb_tile_cache_exit().
|
static |
Definition at line 366 of file cache.c.
References BLI_addhead(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_remove(), BLI_listbase_is_empty(), BLI_remlink(), ListBase::first, ImThreadTile::global, ImGlobalTile::ibuf, ImThreadTile::ibuf, imb_global_cache_get_tile(), ListBase::last, NULL, ImThreadTileCache::tilehash, ImBuf::tiles, ImThreadTileCache::tiles, ImGlobalTile::tx, ImThreadTile::tx, ImGlobalTile::ty, ImThreadTile::ty, ImThreadTileCache::unused, and ImBuf::xtiles.
Referenced by IMB_gettile().
|
static |
Definition at line 173 of file cache.c.
References Freestyle::a, BLI_addtail(), BLI_ghash_new(), BLI_memarena_alloc(), GLOBAL_CACHE, IB_THREAD_CACHE_SIZE, imb_thread_tile_cmp(), imb_thread_tile_hash(), ImGlobalTileCache::memarena, ImThreadTileCache::tilehash, and ImThreadTileCache::unused.
Referenced by IMB_tile_cache_params().
Definition at line 106 of file cache.c.
References Freestyle::a, and usdtokens::b().
Referenced by imb_thread_cache_init().
|
static |
Definition at line 99 of file cache.c.
References ImThreadTile::ibuf, ImThreadTile::tx, and ImThreadTile::ty.
Referenced by imb_thread_cache_init().
Definition at line 208 of file cache.c.
References Freestyle::a, BLI_ghash_free(), BLI_memarena_free(), BLI_mutex_end(), ListBase::first, GLOBAL_CACHE, imb_global_cache_tile_unload(), imb_thread_cache_exit(), ImGlobalTileCache::initialized, ImGlobalTileCache::memarena, ImGlobalTileCache::mutex, ImGlobalTile::next, NULL, ImGlobalTileCache::thread_cache, ImGlobalTileCache::tilehash, ImGlobalTileCache::tiles, and ImGlobalTileCache::totthread.
Referenced by IMB_exit(), and IMB_tile_cache_params().
Definition at line 195 of file cache.c.
References BLI_mutex_init(), GLOBAL_CACHE, IMB_tile_cache_params(), ImGlobalTileCache::initialized, and ImGlobalTileCache::mutex.
Referenced by IMB_init().
void IMB_tile_cache_params | ( | int | totthread, |
int | maxmem | ||
) |
Definition at line 236 of file cache.c.
References Freestyle::a, BLI_ghash_new(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_memarena_use_calloc(), BLI_mutex_init(), GLOBAL_CACHE, imb_global_tile_cmp(), imb_global_tile_hash(), imb_thread_cache_init(), imb_tile_cache_exit(), ImGlobalTileCache::maxmem, ImGlobalTileCache::memarena, ImGlobalTileCache::mutex, ImGlobalTileCache::thread_cache, ImGlobalTileCache::tilehash, and ImGlobalTileCache::totthread.
Referenced by imb_tile_cache_init().
External free.
Definition at line 142 of file cache.c.
References BLI_addtail(), BLI_ghash_lookup(), BLI_ghash_remove(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_remlink(), GLOBAL_CACHE, ImGlobalTile::ibuf, ImGlobalTile::loading, ImGlobalTileCache::mutex, NULL, ImGlobalTileCache::tilehash, ImGlobalTileCache::tiles, ImGlobalTile::tx, ImGlobalTile::ty, and ImGlobalTileCache::unused.
Referenced by imb_freetilesImBuf().
Definition at line 426 of file cache.c.
References Freestyle::a, BLI_mutex_lock(), BLI_mutex_unlock(), ImBuf::flags, from, GLOBAL_CACHE, IB_rect, IMB_getmipmap(), imb_global_cache_get_tile(), ImBuf::mall, MEM_callocN, ImBuf::miptot, ImGlobalTileCache::mutex, NULL, ImBuf::rect, ImGlobalTile::refcount, ImBuf::tiles, ImBuf::tilex, ImBuf::tiley, w(), ImBuf::x, ImBuf::xtiles, y, ImBuf::y, and ImBuf::ytiles.
|
static |
Definition at line 76 of file cache.c.
Referenced by IMB_gettile(), imb_global_cache_get_tile(), imb_global_cache_tile_unload(), imb_thread_cache_init(), imb_tile_cache_exit(), imb_tile_cache_init(), IMB_tile_cache_params(), imb_tile_cache_tile_free(), and IMB_tiles_to_rect().