LLViewerImageList Class Reference

#include <llviewerimagelist.h>

Collaboration diagram for LLViewerImageList:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::set< LLPointer
< LLViewerImage > > 
image_list_t

Public Member Functions

 LLViewerImageList ()
 ~LLViewerImageList ()
void init ()
void shutdown ()
void dump ()
void destroyGL (BOOL save_state=TRUE)
void restoreGL ()
LLViewerImagegetImage (const LLUUID &image_id, BOOL usemipmap=TRUE, BOOL level_immediate=FALSE, LLGLint internal_format=0, LLGLenum primary_format=0, LLHost request_from_host=LLHost())
LLViewerImagegetImageFromFile (const LLString &filename, BOOL usemipmap=TRUE, BOOL level_immediate=FALSE, LLGLint internal_format=0, LLGLenum primary_format=0, const LLUUID &force_id=LLUUID::null)
LLViewerImagegetImageFromHost (const LLUUID &image_id, LLHost host)
LLViewerImagehasImage (const LLUUID &image_id)
void addImage (LLViewerImage *image)
void deleteImage (LLViewerImage *image)
void addImageToList (LLViewerImage *image)
void removeImageFromList (LLViewerImage *image)
void dirtyImage (LLViewerImage *image)
void updateImages (F32 max_time)
void decodeAllImages (F32 max_decode_time)
void handleIRCallback (void **data, const S32 number)
void setUpdateStats (BOOL b)
S32 getMaxResidentTexMem () const
S32 getNumImages ()
void updateMaxResidentTexMem (S32 mem)
void doPreloadImages ()
void doPrefetchImages ()

Static Public Member Functions

static BOOL createUploadFile (const LLString &filename, const LLString &out_filename, const U8 codec)
static LLPointer< LLImageJ2CconvertToUploadFile (LLPointer< LLImageRaw > raw_image)
static void processImageNotInDatabase (LLMessageSystem *msg, void **user_data)
static S32 calcMaxTextureRAM ()
static void receiveImageHeader (LLMessageSystem *msg, void **user_data)
static void receiveImagePacket (LLMessageSystem *msg, void **user_data)
static S32 getMinVideoRamSetting ()
static S32 getMaxVideoRamSetting (bool get_recommended=false)

Public Attributes

image_list_t mLoadingStreamList
image_list_t mCreateTextureList
image_list_t mCallbackList
std::set< LLViewerImage * > mDirtyTextureList
BOOL mForceResetTextureStats

Static Public Attributes

static U32 sTextureBits = 0
static U32 sTexturePackets = 0
static LLStat sNumImagesStat
static LLStat sNumRawImagesStat
static LLStat sGLTexMemStat
static LLStat sGLBoundMemStat
static LLStat sRawMemStat
static LLStat sFormattedMemStat

Private Types

typedef std::map< LLUUID,
LLPointer< LLViewerImage > > 
uuid_map_t
typedef std::set< LLPointer
< LLViewerImage >
, LLViewerImage::Compare
image_priority_list_t
typedef std::vector< LLPointer
< LLViewerImage > > 
callback_data_t
typedef std::set
< callback_data_t * > 
callback_data_list_t

Private Member Functions

 LOG_CLASS (LLViewerImageList)
void updateImagesDecodePriorities ()
F32 updateImagesCreateTextures (F32 max_time)
F32 updateImagesFetchTextures (F32 max_time)
void updateImagesUpdateStats ()

Private Attributes

uuid_map_t mUUIDMap
LLUUID mLastUpdateUUID
LLUUID mLastFetchUUID
image_priority_list_t mImageList
std::set< LLPointer
< LLViewerImage > > 
mImagePreloads
callback_data_list_t mIRCallbackData
BOOL mUpdateStats
S32 mMaxResidentTexMem
LLFrameTimer mForceDecodeTimer

Static Private Attributes

static S32 sNumImages = 0
static void(* sUUIDCallback )(void **, const LLUUID &) = NULL

Friends

class LLTextureView


Detailed Description

Definition at line 67 of file llviewerimagelist.h.


Member Typedef Documentation

Definition at line 149 of file llviewerimagelist.h.

Definition at line 160 of file llviewerimagelist.h.

Definition at line 165 of file llviewerimagelist.h.

Definition at line 171 of file llviewerimagelist.h.

Definition at line 172 of file llviewerimagelist.h.


Constructor & Destructor Documentation

LLViewerImageList::LLViewerImageList (  ) 

Definition at line 88 of file llviewerimagelist.cpp.

LLViewerImageList::~LLViewerImageList (  ) 

Definition at line 199 of file llviewerimagelist.cpp.

References llassert, and mIRCallbackData.


Member Function Documentation

LLViewerImageList::LOG_CLASS ( LLViewerImageList   )  [private]

BOOL LLViewerImageList::createUploadFile ( const LLString filename,
const LLString out_filename,
const U8  codec 
) [static]

Definition at line 782 of file llviewerimagelist.cpp.

References convertToUploadFile(), FALSE, IMG_CODEC_BMP, IMG_CODEC_JPEG, IMG_CODEC_PNG, IMG_CODEC_TGA, llendl, llinfos, and TRUE.

Referenced by handle_compress_image(), and upload_new_resource().

Here is the call graph for this function:

Here is the caller graph for this function:

LLPointer< LLImageJ2C > LLViewerImageList::convertToUploadFile ( LLPointer< LLImageRaw raw_image  )  [static]

Definition at line 882 of file llviewerimagelist.cpp.

References LLControlGroup::getBOOL(), gSavedSettings, LL_IMAGE_REZ_LOSSLESS_CUTOFF, LLViewerImage::MAX_IMAGE_SIZE_DEFAULT, and TRUE.

Referenced by createUploadFile(), and LLFloaterReporter::takeScreenshot().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::processImageNotInDatabase ( LLMessageSystem msg,
void **  user_data 
) [static]

Definition at line 1113 of file llviewerimagelist.cpp.

References _PREHASH_ID, _PREHASH_ImageID, LLFastTimer::FTM_PROCESS_IMAGES, LLMessageSystem::getUUIDFast(), hasImage(), and LLViewerImage::setIsMissingAsset().

Referenced by register_viewer_callbacks().

Here is the call graph for this function:

Here is the caller graph for this function:

S32 LLViewerImageList::calcMaxTextureRAM (  )  [static]

Definition at line 1130 of file llviewerimagelist.cpp.

References clamp_rescale(), LLMemoryInfo::getPhysicalMemoryClamped(), SIXTEEN_MEG, and U32_MAX.

Here is the call graph for this function:

void LLViewerImageList::receiveImageHeader ( LLMessageSystem msg,
void **  user_data 
) [static]

void LLViewerImageList::receiveImagePacket ( LLMessageSystem msg,
void **  user_data 
) [static]

void LLViewerImageList::init ( void   ) 

Definition at line 95 of file llviewerimagelist.cpp.

References doPreloadImages(), gNoRender, mMaxResidentTexMem, mUpdateStats, sNumImages, TRUE, and updateMaxResidentTexMem().

Referenced by LLViewerWindow::LLViewerWindow().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::shutdown (  ) 

void LLViewerImageList::dump (  ) 

void LLViewerImageList::destroyGL ( BOOL  save_state = TRUE  ) 

Definition at line 283 of file llviewerimagelist.cpp.

References LLImageGL::destroyGL().

Referenced by LLViewerWindow::stopGL().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::restoreGL (  ) 

Definition at line 288 of file llviewerimagelist.cpp.

References LLImageGL::restoreGL().

Referenced by LLViewerWindow::restoreGL().

Here is the call graph for this function:

Here is the caller graph for this function:

LLViewerImage * LLViewerImageList::getImage ( const LLUUID image_id,
BOOL  usemipmap = TRUE,
BOOL  level_immediate = FALSE,
LLGLint  internal_format = 0,
LLGLenum  primary_format = 0,
LLHost  request_from_host = LLHost() 
)

Definition at line 356 of file llviewerimagelist.cpp.

References addImage(), LLViewerImage::BOOST_UI, hasImage(), IMG_DEFAULT, LLPointer< Type >::isNull(), LLUUID::isNull(), NULL, and TRUE.

Referenced by LLUndoWearable::applyUndoRedo(), LLTexLayerSetBuffer::bindTexture(), LLVOTextBubble::createDrawable(), doPrefetchImages(), doPreloadImages(), LLWorldMapView::draw(), LLTextureCtrl::draw(), LLFloaterTexturePicker::draw(), LLViewerJointMesh::drawShape(), LLToolDragAndDrop::dropTextureAllFaces(), LLToolDragAndDrop::dropTextureOneFace(), LLViewerImage::getImage(), getImageFromFile(), getImageFromHost(), LLViewerImage::initClass(), LLVOAvatar::invalidateComposite(), LLDrawPoolWater::LLDrawPoolWater(), LLVOClouds::LLVOClouds(), LLVOSky::LLVOSky(), LLPreviewTexture::loadAsset(), LLUIImageList::loadUIImageByID(), LLVOAvatar::onCustomizeStart(), LLViewerMediaImpl::onMediaContentsChange(), LLViewerMediaImpl::onMediaSizeChange(), LLPanelEditWearable::onTextureCommit(), LLWorldMap::processMapBlockReply(), LLWorldMap::processMapLayerReply(), LLVOTree::processUpdateMessage(), receiveImageHeader(), receiveImagePacket(), LLWearable::removeFromAvatar(), LLVOAvatar::removeMissingBakedTextures(), LLPipeline::renderHighlights(), LLVOSky::restoreGL(), LLMapLayerResponder::result(), LLSelectMgr::selectionRevertTextures(), LLSelectMgr::selectionSetImage(), LLCompass::setBkgndTexture(), LLVLComposition::setDetailTextureID(), LLViewerObject::setParticleSource(), LLViewerObject::setTE(), LLHorizontalCompass::setTexture(), LLCompass::setTexture(), LLVOVolume::setVolume(), LLDrawPoolWater::shade(), LLGenePool::spawn(), LLViewerParcelMediaAutoPlay::tick(), LLViewerObject::unpackParticleSource(), LLVOAvatar::updateMeshTextures(), LLVOGrass::updateSpecies(), LLVOVolume::updateTextures(), LLPanelRegionTextureInfo::validateTextureSizes(), and LLWearable::writeToAvatar().

Here is the call graph for this function:

LLViewerImage * LLViewerImageList::getImageFromFile ( const LLString filename,
BOOL  usemipmap = TRUE,
BOOL  level_immediate = FALSE,
LLGLint  internal_format = 0,
LLGLenum  primary_format = 0,
const LLUUID force_id = LLUUID::null 
)

LLViewerImage* LLViewerImageList::getImageFromHost ( const LLUUID image_id,
LLHost  host 
) [inline]

Definition at line 109 of file llviewerimagelist.h.

References FALSE, getImage(), and TRUE.

Referenced by LLVOAvatar::onCustomizeEnd(), LLVOAvatar::setNewBakedTexture(), LLViewerObject::setTETextureCore(), and LLVOAvatar::updateMeshTextures().

Here is the call graph for this function:

Here is the caller graph for this function:

LLViewerImage * LLViewerImageList::hasImage ( const LLUUID image_id  ) 

Definition at line 397 of file llviewerimagelist.cpp.

References mUUIDMap, and NULL.

Referenced by addImage(), getImage(), getImageFromFile(), and processImageNotInDatabase().

Here is the caller graph for this function:

void LLViewerImageList::addImage ( LLViewerImage image  ) 

Definition at line 427 of file llviewerimagelist.cpp.

References addImageToList(), LLViewerImage::getID(), hasImage(), llendl, llerrs, llwarning, mUUIDMap, and sNumImages.

Referenced by LLSurface::createSTexture(), LLSurface::createWaterTexture(), getImage(), getImageFromFile(), LLViewerImage::initClass(), and LLFloaterReporter::takeScreenshot().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::deleteImage ( LLViewerImage image  ) 

Definition at line 448 of file llviewerimagelist.cpp.

References LLViewerImage::getID(), LLViewerImage::hasCallbacks(), llverify, mCallbackList, mUUIDMap, removeImageFromList(), and sNumImages.

Referenced by updateImagesDecodePriorities(), and LLSurface::~LLSurface().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::addImageToList ( LLViewerImage image  ) 

Definition at line 405 of file llviewerimagelist.cpp.

References llassert, llendl, llerrs, llverify, mImageList, LLViewerImage::mInImageList, and TRUE.

Referenced by addImage(), and updateImagesDecodePriorities().

Here is the caller graph for this function:

void LLViewerImageList::removeImageFromList ( LLViewerImage image  ) 

Definition at line 416 of file llviewerimagelist.cpp.

References FALSE, llassert, llendl, llerrs, llverify, mImageList, and LLViewerImage::mInImageList.

Referenced by deleteImage(), and updateImagesDecodePriorities().

Here is the caller graph for this function:

void LLViewerImageList::dirtyImage ( LLViewerImage image  ) 

Definition at line 468 of file llviewerimagelist.cpp.

References mDirtyTextureList.

Referenced by LLViewerImage::updateFetch().

Here is the caller graph for this function:

void LLViewerImageList::updateImages ( F32  max_time  ) 

void LLViewerImageList::decodeAllImages ( F32  max_decode_time  ) 

void LLViewerImageList::handleIRCallback ( void **  data,
const S32  number 
)

void LLViewerImageList::setUpdateStats ( BOOL  b  )  [inline]

Definition at line 129 of file llviewerimagelist.h.

References mUpdateStats.

Referenced by LLViewerObjectList::updateApparentAngles().

Here is the caller graph for this function:

S32 LLViewerImageList::getMaxResidentTexMem (  )  const [inline]

Definition at line 131 of file llviewerimagelist.h.

References mMaxResidentTexMem.

Referenced by LLViewerImage::updateClass().

Here is the caller graph for this function:

S32 LLViewerImageList::getNumImages (  )  [inline]

Definition at line 132 of file llviewerimagelist.h.

References mImageList.

Referenced by LLGLTexMemBar::draw(), and output_statistics().

Here is the caller graph for this function:

void LLViewerImageList::updateMaxResidentTexMem ( S32  mem  ) 

Definition at line 945 of file llviewerimagelist.cpp.

References LLControlGroup::getF32(), getMaxVideoRamSetting(), getMinVideoRamSetting(), LLControlGroup::getS32(), gSavedSettings, llclamp(), llendl, llinfos, llmax(), llmin(), mMaxResidentTexMem, S32, LLControlGroup::setS32(), and VIDEO_CARD_FRAMEBUFFER_MEM.

Referenced by handleVideoMemoryChanged(), and init().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::doPreloadImages (  ) 

void LLViewerImageList::doPrefetchImages (  ) 

S32 LLViewerImageList::getMinVideoRamSetting (  )  [static]

Definition at line 902 of file llviewerimagelist.cpp.

References MIN_VIDEO_RAM.

Referenced by getMaxVideoRamSetting(), LLFloaterHardwareSettings::refreshEnabledState(), and updateMaxResidentTexMem().

Here is the caller graph for this function:

S32 LLViewerImageList::getMaxVideoRamSetting ( bool  get_recommended = false  )  [static]

Definition at line 909 of file llviewerimagelist.cpp.

References getMinVideoRamSetting(), LLMemoryInfo::getPhysicalMemoryClamped(), gGLManager, gSysMemory, llclamp(), llendl, llmax(), llmin(), llwarns, MAX_VIDEO_RAM, MIN_VIDEO_RAM, LLGLManager::mVRAM, and S32.

Referenced by LLFloaterHardwareSettings::refreshEnabledState(), and updateMaxResidentTexMem().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::updateImagesDecodePriorities (  )  [private]

Definition at line 523 of file llviewerimagelist.cpp.

References addImageToList(), deleteImage(), gFrameIntervalSeconds, llmin(), mLastUpdateUUID, mUUIDMap, NULL, removeImageFromList(), and S32.

Referenced by updateImages().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLViewerImageList::updateImagesCreateTextures ( F32  max_time  )  [private]

Definition at line 607 of file llviewerimagelist.cpp.

References LLViewerImage::createTexture(), LLFastTimer::FTM_IMAGE_CREATE, LLTimer::getElapsedTimeF32(), gGLManager, gNoRender, mCreateTextureList, and LLGLManager::mIsDisabled.

Referenced by decodeAllImages(), and updateImages().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLViewerImageList::updateImagesFetchTextures ( F32  max_time  )  [private]

Definition at line 635 of file llviewerimagelist.cpp.

References LLPointer< Type >::get(), LLTimer::getElapsedTimeF32(), gFrameIntervalSeconds, llendl, llerrs, llmin(), llwarns, mImageList, mLastFetchUUID, mUUIDMap, NULL, and S32.

Referenced by updateImages().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImageList::updateImagesUpdateStats (  )  [private]

Definition at line 703 of file llviewerimagelist.cpp.

References FALSE, mForceResetTextureStats, mImageList, mUpdateStats, and LLViewerImage::resetTextureStats().

Referenced by updateImages().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class LLTextureView [friend]

Definition at line 71 of file llviewerimagelist.h.


Member Data Documentation

Definition at line 150 of file llviewerimagelist.h.

Referenced by shutdown().

Definition at line 155 of file llviewerimagelist.h.

Referenced by dirtyImage(), and updateImages().

Definition at line 157 of file llviewerimagelist.h.

Referenced by display(), and updateImagesUpdateStats().

Definition at line 162 of file llviewerimagelist.h.

Referenced by updateImagesDecodePriorities().

Definition at line 163 of file llviewerimagelist.h.

Referenced by updateImagesFetchTextures().

Definition at line 169 of file llviewerimagelist.h.

Referenced by doPreloadImages(), and shutdown().

Definition at line 173 of file llviewerimagelist.h.

Referenced by shutdown(), and ~LLViewerImageList().

Definition at line 175 of file llviewerimagelist.h.

Referenced by init(), setUpdateStats(), and updateImagesUpdateStats().

Definition at line 176 of file llviewerimagelist.h.

Referenced by getMaxResidentTexMem(), init(), and updateMaxResidentTexMem().

Definition at line 177 of file llviewerimagelist.h.

Definition at line 180 of file llviewerimagelist.h.

Referenced by receiveImageHeader(), receiveImagePacket(), and update_statistics().

Definition at line 181 of file llviewerimagelist.h.

Referenced by receiveImageHeader(), receiveImagePacket(), and update_statistics().

Definition at line 183 of file llviewerimagelist.h.

Referenced by init_stat_view(), and updateImages().

Definition at line 184 of file llviewerimagelist.h.

Referenced by init_stat_view(), and updateImages().

Definition at line 185 of file llviewerimagelist.h.

Referenced by init_stat_view(), and updateImages().

Definition at line 186 of file llviewerimagelist.h.

Referenced by init_stat_view(), and updateImages().

Definition at line 187 of file llviewerimagelist.h.

Referenced by init_stat_view(), and updateImages().

Definition at line 188 of file llviewerimagelist.h.

Referenced by init_stat_view(), and updateImages().

S32 LLViewerImageList::sNumImages = 0 [static, private]

Definition at line 191 of file llviewerimagelist.h.

Referenced by addImage(), deleteImage(), init(), and updateImages().

void(* LLViewerImageList::sUUIDCallback)(void **, const LLUUID &) ( void **  ,
const LLUUID  
) = NULL [static, private]


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:26:50 2008 for SecondLife by  doxygen 1.5.5