|
Ptex
|
Ptex cache implementation. More...
#include <PtexCache.h>
Public Member Functions | |
| PtexCacheImpl (int maxFiles, int maxMem) | |
| virtual void | release () |
| Release resources held by this pointer (pointer becomes invalid). More... | |
| void | setPendingDelete () |
| void | handlePendingDelete () |
| void | setFileInUse (PtexLruItem *file) |
| void | setFileUnused (PtexLruItem *file) |
| void | removeFile () |
| void | setDataInUse (PtexLruItem *data, int size) |
| void | setDataUnused (PtexLruItem *data, int size) |
| void | removeData (int size) |
| void | purgeFiles () |
| void | purgeData () |
Public Member Functions inherited from PtexCache | |
| virtual void | setSearchPath (const char *path)=0 |
| Set a search path for finding textures. More... | |
| virtual const char * | getSearchPath ()=0 |
| Query the search path. More... | |
| virtual PtexTexture * | get (const char *path, Ptex::String &error)=0 |
| Open a texture. More... | |
| virtual void | purge (PtexTexture *texture)=0 |
| Remove a texture file from the cache. More... | |
| virtual void | purge (const char *path)=0 |
| Remove a texture file from the cache by pathname. More... | |
| virtual void | purgeAll ()=0 |
| Remove all texture files from the cache. More... | |
Static Public Member Functions | |
| static void | addFile () |
| static void | addData () |
Static Public Member Functions inherited from PtexCache | |
| static PtexCache * | create (int maxFiles=0, int maxMem=0, bool premultiply=false, PtexInputHandler *handler=0) |
| Create a cache with the specified limits. More... | |
Public Attributes | |
| Mutex | openlock |
| CacheLock | cachelock |
Protected Member Functions | |
| ~PtexCacheImpl () | |
Protected Member Functions inherited from PtexCache | |
| virtual | ~PtexCache () |
| Destructor not for public use. Use release() instead. More... | |
Private Attributes | |
| bool | _pendingDelete |
| int | _maxFiles |
| int | _unusedFileCount |
| long int | _maxDataSize |
| long int | _unusedDataSize |
| int | _minDataCount |
| int | _unusedDataCount |
| PtexLruList | _unusedFiles |
| PtexLruList | _unusedData |
Ptex cache implementation.
Maintains a file and memory cache within set limits
Definition at line 192 of file PtexCache.h.
|
inline |
Definition at line 194 of file PtexCache.h.
|
protected |
Definition at line 146 of file PtexCache.cpp.
References _unusedData, _unusedFiles, cachelock, and PtexLruList::pop().
|
inlinestatic |
Definition at line 227 of file PtexCache.h.
References STATS_INC.
|
inlinestatic |
Definition at line 223 of file PtexCache.h.
References STATS_INC.
|
inline |
Definition at line 220 of file PtexCache.h.
Referenced by PtexReader::release(), and PtexReader::TiledFaceBase::release().
|
inline |
Definition at line 240 of file PtexCache.h.
Referenced by PtexReader::blendFaces(), PtexReader::readLevel(), PtexReader::readMetaData(), PtexReader::TiledFace::readTile(), PtexReader::PackedFace::reduce(), and PtexReader::TiledFaceBase::reduce().
|
inline |
Definition at line 232 of file PtexCache.h.
Referenced by PtexReaderCache::get().
|
inlinevirtual |
Release resources held by this pointer (pointer becomes invalid).
Implements PtexCache.
Definition at line 213 of file PtexCache.h.
| void PtexCacheImpl::removeData | ( | int | size | ) |
Definition at line 192 of file PtexCache.cpp.
References _unusedDataCount, _unusedDataSize, and STATS_INC.
| void PtexCacheImpl::removeFile | ( | ) |
Definition at line 169 of file PtexCache.cpp.
References _unusedFileCount, and STATS_INC.
| void PtexCacheImpl::setDataInUse | ( | PtexLruItem * | data, |
| int | size | ||
| ) |
Definition at line 176 of file PtexCache.cpp.
References _unusedData, _unusedDataCount, _unusedDataSize, cachelock, and PtexLruList::extract().
| void PtexCacheImpl::setDataUnused | ( | PtexLruItem * | data, |
| int | size | ||
| ) |
Definition at line 184 of file PtexCache.cpp.
References _unusedData, _unusedDataCount, _unusedDataSize, cachelock, and PtexLruList::push().
| void PtexCacheImpl::setFileInUse | ( | PtexLruItem * | file | ) |
Definition at line 155 of file PtexCache.cpp.
References _unusedFileCount, _unusedFiles, cachelock, and PtexLruList::extract().
| void PtexCacheImpl::setFileUnused | ( | PtexLruItem * | file | ) |
Definition at line 162 of file PtexCache.cpp.
References _unusedFileCount, _unusedFiles, cachelock, and PtexLruList::push().
|
inline |
Definition at line 219 of file PtexCache.h.
Referenced by PtexReader::~PtexReader().
|
private |
Definition at line 258 of file PtexCache.h.
|
private |
Definition at line 257 of file PtexCache.h.
|
private |
Definition at line 259 of file PtexCache.h.
|
private |
Definition at line 255 of file PtexCache.h.
|
private |
Definition at line 260 of file PtexCache.h.
Referenced by setDataInUse(), setDataUnused(), and ~PtexCacheImpl().
|
private |
Definition at line 259 of file PtexCache.h.
Referenced by removeData(), setDataInUse(), and setDataUnused().
|
private |
Definition at line 258 of file PtexCache.h.
Referenced by removeData(), setDataInUse(), and setDataUnused().
|
private |
Definition at line 257 of file PtexCache.h.
Referenced by removeFile(), setFileInUse(), and setFileUnused().
|
private |
Definition at line 260 of file PtexCache.h.
Referenced by setFileInUse(), setFileUnused(), and ~PtexCacheImpl().
| CacheLock PtexCacheImpl::cachelock |
Definition at line 216 of file PtexCache.h.
Referenced by PtexReader::blendFaces(), PtexReaderCache::get(), PtexReader::getData(), PtexReader::MetaData::getEntry(), PtexReader::getMetaData(), PtexReader::TiledReducedFace::getTile(), PtexReaderCache::purge(), PtexReaderCache::purgeAll(), PtexReader::readFace(), PtexReader::readLevel(), PtexReader::readMetaData(), PtexReader::TiledFace::readTile(), PtexReader::PackedFace::reduce(), PtexReader::ConstantFace::reduce(), PtexReader::TiledFaceBase::reduce(), PtexReader::release(), setDataInUse(), setDataUnused(), setFileInUse(), setFileUnused(), and ~PtexCacheImpl().
| Mutex PtexCacheImpl::openlock |
Definition at line 215 of file PtexCache.h.
Referenced by PtexReaderCache::get(), PtexReaderCache::getSearchPath(), and PtexReaderCache::setSearchPath().
1.8.10