LLViewerImage Class Reference

#include <llviewerimage.h>

Inheritance diagram for LLViewerImage:

Inheritance graph
[legend]
Collaboration diagram for LLViewerImage:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { MAX_IMAGE_SIZE_DEFAULT = 1024, INVALID_DISCARD_LEVEL = 0x7fff }
enum  {
  BOOST_NONE = 0, BOOST_AVATAR_BAKED = 1, BOOST_AVATAR = 2, BOOST_CLOUDS = 3,
  BOOST_SCULPTED = 4, BOOST_HIGH = 10, BOOST_TERRAIN = 11, BOOST_SELECTED = 12,
  BOOST_HUD = 13, BOOST_AVATAR_BAKED_SELF = 14, BOOST_UI = 15, BOOST_PREVIEW = 16,
  BOOST_MAP = 17, BOOST_MAP_LAYER = 18, BOOST_AVATAR_SELF = 19, BOOST_MAX_LEVEL
}

Public Member Functions

 LLViewerImage (const LLString &filename, const LLUUID &id, BOOL usemipmaps=TRUE)
 LLViewerImage (const LLUUID &id, BOOL usemipmaps=TRUE)
 LLViewerImage (const U32 width, const U32 height, const U8 components, BOOL usemipmaps)
 LLViewerImage (const LLImageRaw *raw, BOOL usemipmaps)
void dump ()
BOOL bind (const S32 stage=0) const
void reinit (BOOL usemipmaps=TRUE)
const LLUUIDgetID ()
void addTextureStats (F32 pixel_area) const
void addTextureStats (F32 pixel_area, F32 texel_area_ratio) const
void addTextureStats (F32 pixel_area, F32 texel_area_ratio, F32 cos_center_angle) const
void resetTextureStats (BOOL zero=FALSE)
void processTextureStats ()
void setLoadedCallback (loaded_callback_func cb, S32 discard_level, BOOL keep_imageraw, void *userdata)
BOOL createTexture (S32 usename=0)
BOOL needsAux () const
void setNeedsAux (const BOOL needs_aux)
void setDesiredDiscardLevel (S32 discard)
S32 getDesiredDiscardLevel ()
void setMinDiscardLevel (S32 discard)
void setTargetHost (LLHost host)
LLHost getTargetHost () const
void setBoostLevel (S32 level)
S32 getBoostLevel ()
F32 getDecodePriority () const
F32 calcDecodePriority ()
void setDecodePriority (F32 priority=-1.0f)
bool updateFetch ()
void setKnownDrawSize (S32 width, S32 height)
void setIsMissingAsset ()
BOOL isMissingAsset () const
bool hasCallbacks ()
bool doLoadedCallbacks ()
S32 getOriginalWidth ()
S32 getOriginalHeight ()

Static Public Member Functions

static void initClass ()
static void cleanupClass ()
static void updateClass (const F32 velocity, const F32 angular_velocity)
static LLViewerImagegetImage (const LLUUID &image_id)
static BOOL bindTexture (LLImageGL *image, const U32 stage=0)
static F32 maxDecodePriority ()

Public Attributes

S32 mFullWidth
S32 mFullHeight
S32 mOrigWidth
S32 mOrigHeight
LLString mLocalFileName
F32 mMaxVirtualSize
F32 mMaxCosAngle
F32 mTexelsPerImage
F32 mDiscardVirtualSize
S8 mInImageList
S8 mIsMediaTexture
S32 mRequestedDiscardLevel
F32 mRequestedDownloadPriority
S32 mFetchState
U32 mFetchPriority
F32 mDownloadProgress
F32 mFetchDeltaTime
F32 mRequestDeltaTime
S32 mDecodeFrame
S32 mVisibleFrame
LLFrameTimer mLastPacketTimer
LLFrameTimer mLastReferencedTimer

Static Public Attributes

static const U32 sCurrentFileVersion = 1
static LLPointer< LLViewerImagesMissingAssetImagep = NULL
static LLPointer< LLViewerImagesWhiteImagep = NULL
static LLPointer< LLImageGLsDefaultImagep = NULL
static LLPointer< LLViewerImagesSmokeImagep = NULL
static LLPointer< LLImageGLsNullImagep = NULL
static S32 sImageCount = 0
static LLTimer sEvaluationTimer
static F32 sDesiredDiscardBias = 0.f
static F32 sDesiredDiscardScale = 1.1f
static S32 sBoundTextureMemory = 0
static S32 sTotalTextureMemory = 0
static S32 sMaxBoundTextureMem = 0
static S32 sMaxTotalTextureMem = 0
static BOOL sDontLoadVolumeTextures = FALSE

Protected Member Functions

 ~LLViewerImage ()

Private Types

typedef std::list
< LLLoadedCallbackEntry * > 
callback_list_t

Private Member Functions

 LOG_CLASS (LLViewerImage)
void cleanup ()
void init (bool firstinit)
LLImageRawcreateRawImage (S8 discard_level=0, BOOL allocate=FALSE)
void destroyRawImage ()

Private Attributes

LLUUID mID
S8 mDesiredDiscardLevel
S8 mMinDesiredDiscardLevel
S8 mNeedsCreateTexture
S8 mNeedsAux
S8 mDecodingAux
S8 mIsRawImageValid
S8 mHasFetcher
S8 mIsFetching
S8 mFullyLoaded
S8 mIsMissingAsset
S32 mKnownDrawWidth
S32 mKnownDrawHeight
F32 mDecodePriority
S32 mBoostLevel
callback_list_t mLoadedCallbackList
LLPointer< LLImageRawmRawImage
S32 mRawDiscardLevel
S32 mMinDiscardLevel
F32 mCalculatedDiscardLevel
LLPointer< LLImageRawmAuxRawImage
LLHost mTargetHost

Friends

class LLTextureBar
class LLTextureView

Classes

struct  Compare
struct  CompareByHostAndPriority
struct  CompareForRemoval
struct  CompareForWorstVisibility


Detailed Description

Definition at line 74 of file llviewerimage.h.


Member Typedef Documentation

Definition at line 364 of file llviewerimage.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
MAX_IMAGE_SIZE_DEFAULT 
INVALID_DISCARD_LEVEL 

Definition at line 175 of file llviewerimage.h.

anonymous enum

Enumerator:
BOOST_NONE 
BOOST_AVATAR_BAKED 
BOOST_AVATAR 
BOOST_CLOUDS 
BOOST_SCULPTED 
BOOST_HIGH 
BOOST_TERRAIN 
BOOST_SELECTED 
BOOST_HUD 
BOOST_AVATAR_BAKED_SELF 
BOOST_UI 
BOOST_PREVIEW 
BOOST_MAP 
BOOST_MAP_LAYER 
BOOST_AVATAR_SELF 
BOOST_MAX_LEVEL 

Definition at line 249 of file llviewerimage.h.


Constructor & Destructor Documentation

LLViewerImage::~LLViewerImage (  )  [protected]

Definition at line 312 of file llviewerimage.cpp.

References cleanup(), LLTextureFetch::deleteRequest(), getID(), LLAppViewer::getTextureFetch(), mHasFetcher, and sImageCount.

Here is the call graph for this function:

LLViewerImage::LLViewerImage ( const LLString filename,
const LLUUID id,
BOOL  usemipmaps = TRUE 
)

Definition at line 209 of file llviewerimage.cpp.

References gDirUtilp, LLDir::getExpandedFilename(), init(), LL_PATH_SKINS, mLocalFileName, and sImageCount.

Referenced by initClass().

Here is the call graph for this function:

Here is the caller graph for this function:

LLViewerImage::LLViewerImage ( const LLUUID id,
BOOL  usemipmaps = TRUE 
)

Definition at line 201 of file llviewerimage.cpp.

References init(), and sImageCount.

Here is the call graph for this function:

LLViewerImage::LLViewerImage ( const U32  width,
const U32  height,
const U8  components,
BOOL  usemipmaps 
)

Definition at line 219 of file llviewerimage.cpp.

References FALSE, LLUUID::generate(), init(), mFullyLoaded, mID, mNeedsAux, sImageCount, and TRUE.

Here is the call graph for this function:

LLViewerImage::LLViewerImage ( const LLImageRaw raw,
BOOL  usemipmaps 
)

Definition at line 230 of file llviewerimage.cpp.

References FALSE, LLUUID::generate(), init(), mFullyLoaded, mID, mNeedsAux, sImageCount, and TRUE.

Here is the call graph for this function:


Member Function Documentation

LLViewerImage::LOG_CLASS ( LLViewerImage   )  [private]

void LLViewerImage::initClass ( void   )  [static]

void LLViewerImage::cleanupClass (  )  [static]

Definition at line 129 of file llviewerimage.cpp.

References NULL, sDefaultImagep, sMissingAssetImagep, sNullImagep, sSmokeImagep, stop_glerror, and sWhiteImagep.

Referenced by LLViewerWindow::~LLViewerWindow().

Here is the caller graph for this function:

void LLViewerImage::updateClass ( const F32  velocity,
const F32  angular_velocity 
) [static]

LLViewerImage * LLViewerImage::getImage ( const LLUUID image_id  )  [static]

Definition at line 192 of file llviewerimage.cpp.

References LLViewerImageList::getImage(), and gImageList.

Referenced by LLViewerMediaImpl::updateMovieImage().

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL LLViewerImage::bindTexture ( LLImageGL image,
const U32  stage = 0 
) [inline, static]

void LLViewerImage::dump (  )  [virtual]

Reimplemented from LLImageGL.

Definition at line 296 of file llviewerimage.cpp.

References LLImageGL::dump(), llendl, llinfos, mFullHeight, mFullWidth, mID, mIsMissingAsset, mOrigHeight, mOrigWidth, and S32.

Here is the call graph for this function:

BOOL LLViewerImage::bind ( const S32  stage = 0  )  const [virtual]

void LLViewerImage::reinit ( BOOL  usemipmaps = TRUE  ) 

Definition at line 346 of file llviewerimage.cpp.

References cleanup(), init(), LLImageGL::init(), and LLImageGL::setSize().

Referenced by LLViewerMediaImpl::initializePlaceholderImage(), and LLViewerMediaImpl::updateMovieImage().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLUUID& LLViewerImage::getID (  )  [inline]

void LLViewerImage::addTextureStats ( F32  pixel_area  )  const [inline]

void LLViewerImage::addTextureStats ( F32  pixel_area,
F32  texel_area_ratio 
) const [inline]

Definition at line 208 of file llviewerimage.h.

References mMaxCosAngle, and mMaxVirtualSize.

void LLViewerImage::addTextureStats ( F32  pixel_area,
F32  texel_area_ratio,
F32  cos_center_angle 
) const

Definition at line 433 of file llviewerimage.cpp.

References llclamp(), mMaxCosAngle, and mMaxVirtualSize.

Here is the call graph for this function:

void LLViewerImage::resetTextureStats ( BOOL  zero = FALSE  ) 

Definition at line 449 of file llviewerimage.cpp.

References BOOST_SCULPTED, getBoostLevel(), mMaxCosAngle, and mMaxVirtualSize.

Referenced by LLViewerImageList::updateImagesUpdateStats().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImage::processTextureStats (  ) 

void LLViewerImage::setLoadedCallback ( loaded_callback_func  cb,
S32  discard_level,
BOOL  keep_imageraw,
void *  userdata 
)

BOOL LLViewerImage::createTexture ( S32  usename = 0  ) 

BOOL LLViewerImage::needsAux (  )  const [inline]

Definition at line 236 of file llviewerimage.h.

References mNeedsAux.

Referenced by LLViewerImageList::shutdown(), and updateFetch().

Here is the caller graph for this function:

void LLViewerImage::setNeedsAux ( const BOOL  needs_aux  )  [inline]

Definition at line 237 of file llviewerimage.h.

References mNeedsAux.

Referenced by LLVOAvatar::onFirstTEMessageReceived(), and LLVOAvatar::updateMeshTextures().

Here is the caller graph for this function:

void LLViewerImage::setDesiredDiscardLevel ( S32  discard  )  [inline]

Definition at line 240 of file llviewerimage.h.

References mDesiredDiscardLevel.

S32 LLViewerImage::getDesiredDiscardLevel (  )  [inline]

Definition at line 241 of file llviewerimage.h.

References mDesiredDiscardLevel.

Referenced by LLViewerImageList::dump(), LLViewerImageList::shutdown(), and updateFetch().

Here is the caller graph for this function:

void LLViewerImage::setMinDiscardLevel ( S32  discard  )  [inline]

Definition at line 243 of file llviewerimage.h.

References llmin(), and mMinDesiredDiscardLevel.

Referenced by LLVOAvatar::setLocalTexture().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImage::setTargetHost ( LLHost  host  )  [inline]

Definition at line 246 of file llviewerimage.h.

References mTargetHost.

LLHost LLViewerImage::getTargetHost (  )  const [inline]

Definition at line 247 of file llviewerimage.h.

References mTargetHost.

Referenced by LLViewerImageList::shutdown(), updateFetch(), and LLVOAvatar::updateTextures().

Here is the caller graph for this function:

void LLViewerImage::setBoostLevel ( S32  level  ) 

Definition at line 718 of file llviewerimage.cpp.

References BOOST_HIGH, mBoostLevel, and processTextureStats().

Referenced by LLVOAvatar::addBakedTextureStats(), LLVOAvatar::addLocalTextureStats(), LLViewerObject::boostTexturePriority(), LLWorldMapView::draw(), LLVOClouds::LLVOClouds(), and LLVOVolume::updateTextures().

Here is the call graph for this function:

Here is the caller graph for this function:

S32 LLViewerImage::getBoostLevel (  )  [inline]

Definition at line 270 of file llviewerimage.h.

References mBoostLevel.

Referenced by LLViewerImageList::dump(), and resetTextureStats().

Here is the caller graph for this function:

F32 LLViewerImage::getDecodePriority (  )  const [inline]

F32 LLViewerImage::calcDecodePriority (  ) 

F32 LLViewerImage::maxDecodePriority (  )  [static]

Definition at line 700 of file llviewerimage.cpp.

Referenced by LLTextureFetchWorker::calcWorkPriority().

Here is the caller graph for this function:

void LLViewerImage::setDecodePriority ( F32  priority = -1.0f  ) 

Definition at line 705 of file llviewerimage.cpp.

References calcDecodePriority(), llassert, mDecodePriority, and mInImageList.

Referenced by LLViewerImageList::decodeAllImages().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLViewerImage::updateFetch (  ) 

void LLViewerImage::setKnownDrawSize ( S32  width,
S32  height 
)

Definition at line 1189 of file llviewerimage.cpp.

References addTextureStats(), mKnownDrawHeight, and mKnownDrawWidth.

Referenced by LLWorldMapView::draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImage::setIsMissingAsset (  ) 

Definition at line 945 of file llviewerimage.cpp.

References LLTextureFetch::deleteRequest(), FALSE, getID(), LLAppViewer::getTextureFetch(), llendl, llwarns, mFetchPriority, mFetchState, mHasFetcher, mID, mIsFetching, mIsMissingAsset, mLocalFileName, and TRUE.

Referenced by createTexture(), LLViewerImageList::processImageNotInDatabase(), and updateFetch().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLViewerImage::isMissingAsset (  )  const [inline]

Definition at line 289 of file llviewerimage.h.

References mIsMissingAsset.

Referenced by doLoadedCallbacks(), and LLWorldMapView::draw().

Here is the caller graph for this function:

bool LLViewerImage::hasCallbacks (  )  [inline]

Definition at line 291 of file llviewerimage.h.

References mLoadedCallbackList.

Referenced by LLViewerImageList::deleteImage().

Here is the caller graph for this function:

bool LLViewerImage::doLoadedCallbacks (  ) 

S32 LLViewerImage::getOriginalWidth (  )  [inline]

Definition at line 297 of file llviewerimage.h.

References mOrigWidth.

Referenced by LLUIImageList::onUIImageLoaded().

Here is the caller graph for this function:

S32 LLViewerImage::getOriginalHeight (  )  [inline]

Definition at line 298 of file llviewerimage.h.

References mOrigHeight.

Referenced by LLUIImageList::onUIImageLoaded().

Here is the caller graph for this function:

void LLViewerImage::cleanup (  )  [private, virtual]

Reimplemented from LLImageGL.

Definition at line 326 of file llviewerimage.cpp.

References LLImageGL::cleanup(), destroyRawImage(), FALSE, LLLoadedCallbackEntry::mCallback, mLoadedCallbackList, LLLoadedCallbackEntry::mUserData, NULL, and TRUE.

Referenced by reinit(), and ~LLViewerImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImage::init ( bool  firstinit  )  [private]

LLImageRaw * LLViewerImage::createRawImage ( S8  discard_level = 0,
BOOL  allocate = FALSE 
) [private]

Definition at line 1240 of file llviewerimage.cpp.

References FALSE, LLImageGL::getHeight(), LLImageGL::getWidth(), llassert, llendl, llerrs, mAuxRawImage, LLImageGL::mComponents, mIsRawImageValid, mRawDiscardLevel, mRawImage, LLPointer< Type >::notNull(), NULL, and TRUE.

Referenced by doLoadedCallbacks().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLViewerImage::destroyRawImage (  )  [private]

Definition at line 1264 of file llviewerimage.cpp.

References FALSE, INVALID_DISCARD_LEVEL, mAuxRawImage, mIsRawImageValid, mRawDiscardLevel, mRawImage, and NULL.

Referenced by cleanup(), createTexture(), doLoadedCallbacks(), and updateFetch().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class LLTextureBar [friend]

Definition at line 78 of file llviewerimage.h.

friend class LLTextureView [friend]

Definition at line 79 of file llviewerimage.h.


Member Data Documentation

Definition at line 310 of file llviewerimage.h.

Referenced by createTexture(), dump(), init(), processTextureStats(), and updateFetch().

Definition at line 311 of file llviewerimage.h.

Referenced by createTexture(), dump(), init(), processTextureStats(), and updateFetch().

Definition at line 313 of file llviewerimage.h.

Referenced by createTexture(), dump(), getOriginalWidth(), and init().

Definition at line 314 of file llviewerimage.h.

Referenced by createTexture(), dump(), getOriginalHeight(), and init().

Definition at line 319 of file llviewerimage.h.

Referenced by addTextureStats(), calcDecodePriority(), init(), and resetTextureStats().

Definition at line 321 of file llviewerimage.h.

Referenced by init(), and processTextureStats().

Definition at line 322 of file llviewerimage.h.

Referenced by init(), and processTextureStats().

Definition at line 328 of file llviewerimage.h.

Referenced by init(), and updateFetch().

Definition at line 329 of file llviewerimage.h.

Referenced by init(), and updateFetch().

Definition at line 330 of file llviewerimage.h.

Referenced by init(), setIsMissingAsset(), and updateFetch().

Definition at line 332 of file llviewerimage.h.

Referenced by init(), and updateFetch().

Definition at line 333 of file llviewerimage.h.

Referenced by init(), and updateFetch().

Definition at line 334 of file llviewerimage.h.

Referenced by updateFetch().

Definition at line 335 of file llviewerimage.h.

Referenced by calcDecodePriority(), and init().

Definition at line 336 of file llviewerimage.h.

Referenced by calcDecodePriority(), and init().

Definition at line 340 of file llviewerimage.h.

Definition at line 346 of file llviewerimage.h.

Referenced by init(), processTextureStats(), and setMinDiscardLevel().

Definition at line 348 of file llviewerimage.h.

Referenced by doLoadedCallbacks(), init(), LLViewerImage(), needsAux(), and setNeedsAux().

Definition at line 349 of file llviewerimage.h.

Referenced by init().

Definition at line 351 of file llviewerimage.h.

Referenced by init(), setIsMissingAsset(), updateFetch(), and ~LLViewerImage().

Definition at line 352 of file llviewerimage.h.

Referenced by init(), setIsMissingAsset(), and updateFetch().

Definition at line 353 of file llviewerimage.h.

Referenced by init(), LLViewerImage(), and updateFetch().

S8 LLViewerImage::mIsMissingAsset [mutable, private]

Definition at line 358 of file llviewerimage.h.

Referenced by init(), processTextureStats(), and setKnownDrawSize().

Definition at line 359 of file llviewerimage.h.

Referenced by init(), processTextureStats(), and setKnownDrawSize().

Definition at line 369 of file llviewerimage.h.

Referenced by calcDecodePriority(), init(), and updateFetch().

Definition at line 370 of file llviewerimage.h.

Referenced by init(), and processTextureStats().

Definition at line 374 of file llviewerimage.h.

Referenced by createRawImage(), destroyRawImage(), doLoadedCallbacks(), and updateFetch().

Definition at line 379 of file llviewerimage.h.

Definition at line 381 of file llviewerimage.h.

Referenced by bind(), cleanupClass(), and LLViewerImageList::doPreloadImages().

Definition at line 382 of file llviewerimage.h.

Referenced by cleanupClass(), and LLViewerImageList::doPreloadImages().

Definition at line 385 of file llviewerimage.h.

Referenced by bind(), cleanupClass(), initClass(), and LLPipeline::renderHighlights().

Definition at line 387 of file llviewerimage.h.

Referenced by LLViewerImage(), and ~LLViewerImage().

Definition at line 388 of file llviewerimage.h.

Referenced by updateClass().

Definition at line 389 of file llviewerimage.h.

Referenced by LLGLTexMemBar::draw(), processTextureStats(), and updateClass().

Definition at line 390 of file llviewerimage.h.

Referenced by processTextureStats().

Definition at line 392 of file llviewerimage.h.

Referenced by LLGLTexMemBar::draw(), processTextureStats(), and updateClass().

Definition at line 394 of file llviewerimage.h.

Referenced by LLGLTexMemBar::draw(), processTextureStats(), and updateClass().

Definition at line 395 of file llviewerimage.h.

Referenced by init_debug_rendering_menu(), and LLVOVolume::updateTextures().


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

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