LLImageFormatted Class Reference

#include <llimage.h>

Inheritance diagram for LLImageFormatted:

Inheritance graph
[legend]
Collaboration diagram for LLImageFormatted:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLImageFormatted (S8 codec)
void deleteData ()
U8allocateData (S32 size=-1)
U8reallocateData (S32 size)
void dump ()
void sanityCheck ()
virtual S32 calcHeaderSize ()
virtual S32 calcDataSize (S32 discard_level)
virtual S32 calcDiscardLevelBytes (S32 bytes)
virtual S8 getRawDiscardLevel ()
BOOL load (const LLString &filename)
BOOL save (const LLString &filename)
virtual BOOL updateData ()=0
void setData (U8 *data, S32 size)
void appendData (U8 *data, S32 size)
virtual BOOL decode (LLImageRaw *raw_image, F32 decode_time)=0
virtual BOOL decodeChannels (LLImageRaw *raw_image, F32 decode_time, S32 first_channel, S32 max_channel)
virtual BOOL encode (const LLImageRaw *raw_image, F32 encode_time)=0
S8 getCodec () const
BOOL isDecoding () const
BOOL isDecoded () const
void setDiscardLevel (S8 discard_level)
S8 getDiscardLevel () const

Static Public Member Functions

static LLImageFormattedcreateFromType (S8 codec)
static LLImageFormattedcreateFromExtension (const LLString &instring)

Static Public Attributes

static S32 sGlobalFormattedMemory = 0

Protected Member Functions

 ~LLImageFormatted ()
BOOL copyData (U8 *data, S32 size)

Protected Attributes

S8 mCodec
S8 mDecoding
S8 mDecoded
S8 mDiscardLevel


Detailed Description

Definition at line 235 of file llimage.h.


Constructor & Destructor Documentation

LLImageFormatted::~LLImageFormatted (  )  [protected]

Definition at line 1262 of file llimage.cpp.

References deleteData().

Here is the call graph for this function:

LLImageFormatted::LLImageFormatted ( S8  codec  ) 

Definition at line 1251 of file llimage.cpp.

References LLImageBase::mMemType, and LLMemType::MTYPE_IMAGEFORMATTED.


Member Function Documentation

LLImageFormatted * LLImageFormatted::createFromType ( S8  codec  )  [static]

Definition at line 1272 of file llimage.cpp.

References IMG_CODEC_BMP, IMG_CODEC_DXT, IMG_CODEC_J2C, IMG_CODEC_JPEG, IMG_CODEC_PNG, IMG_CODEC_TGA, and NULL.

Referenced by createFromExtension(), and LLTextureCache::ReadResponder::setData().

Here is the caller graph for this function:

LLImageFormatted * LLImageFormatted::createFromExtension ( const LLString instring  )  [static]

Definition at line 1305 of file llimage.cpp.

References codec, createFromType(), exten, and LLImageBase::getCodecFromExtension().

Referenced by LLDrawPoolWLSky::LLDrawPoolWLSky(), and LLViewerWindow::saveImageNumbered().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageFormatted::deleteData (  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1399 of file llimage.cpp.

References LLImageBase::deleteData(), LLImageBase::getDataSize(), and sGlobalFormattedMemory.

Referenced by copyData(), LLImageTGA::encode(), load(), LLImageTGA::loadFile(), setData(), and ~LLImageFormatted().

Here is the call graph for this function:

Here is the caller graph for this function:

U8 * LLImageFormatted::allocateData ( S32  size = -1  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1382 of file llimage.cpp.

References LLImageBase::allocateData(), LLImageBase::getDataSize(), and sGlobalFormattedMemory.

Referenced by copyData(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageBMP::encode(), LLImageDXT::encodeDXT(), load(), and LLImageTGA::loadFile().

Here is the call graph for this function:

Here is the caller graph for this function:

U8 * LLImageFormatted::reallocateData ( S32  size  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1390 of file llimage.cpp.

References LLImageBase::getDataSize(), LLImageBase::reallocateData(), and sGlobalFormattedMemory.

Referenced by appendData().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageFormatted::dump (  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1323 of file llimage.cpp.

References LLImageBase::dump(), llendl, llinfos, mCodec, mDecoded, mDecoding, and S32.

Here is the call graph for this function:

void LLImageFormatted::sanityCheck (  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 1408 of file llimage.cpp.

References IMG_CODEC_EOF, llendl, llerrs, mCodec, mDecoded, mDecoding, S32, and LLImageBase::sanityCheck().

Here is the call graph for this function:

virtual S32 LLImageFormatted::calcHeaderSize (  )  [inline, virtual]

Reimplemented in LLImageDXT, and LLImageJ2C.

Definition at line 260 of file llimage.h.

S32 LLImageFormatted::calcDataSize ( S32  discard_level  )  [virtual]

Reimplemented in LLImageDXT, and LLImageJ2C.

Definition at line 1336 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getHeight(), LLImageBase::getWidth(), llmax(), mDiscardLevel, and S32.

Referenced by calcDiscardLevelBytes().

Here is the call graph for this function:

Here is the caller graph for this function:

S32 LLImageFormatted::calcDiscardLevelBytes ( S32  bytes  )  [virtual]

Reimplemented in LLImageJ2C.

Definition at line 1349 of file llimage.cpp.

References calcDataSize(), llassert, MAX_IMAGE_MIP, and S32.

Referenced by LLImageDXT::updateData().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual S8 LLImageFormatted::getRawDiscardLevel (  )  [inline, virtual]

Reimplemented in LLImageJ2C.

Definition at line 266 of file llimage.h.

References mDiscardLevel.

BOOL LLImageFormatted::load ( const LLString filename  ) 

Definition at line 1466 of file llimage.cpp.

References allocateData(), deleteData(), FALSE, ll_apr_file_open(), LL_APR_RB, LLImageBase::resetLastError(), S32, LLImageBase::setLastError(), and updateData().

Here is the call graph for this function:

BOOL LLImageFormatted::save ( const LLString filename  ) 

virtual BOOL LLImageFormatted::updateData (  )  [pure virtual]

Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.

Referenced by load().

Here is the caller graph for this function:

void LLImageFormatted::setData ( U8 data,
S32  size 
)

Definition at line 1436 of file llimage.cpp.

References deleteData(), LLImageBase::getData(), LLImageBase::getDataSize(), LLImageBase::setDataAndSize(), and sGlobalFormattedMemory.

Referenced by appendData(), LLImageDXT::convertToDXR(), and LLImageJ2C::validate().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageFormatted::appendData ( U8 data,
S32  size 
)

Definition at line 1446 of file llimage.cpp.

References LLImageBase::getData(), LLImageBase::getDataSize(), reallocateData(), S32, and setData().

Here is the call graph for this function:

virtual BOOL LLImageFormatted::decode ( LLImageRaw raw_image,
F32  decode_time 
) [pure virtual]

Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.

Referenced by decodeChannels().

Here is the caller graph for this function:

BOOL LLImageFormatted::decodeChannels ( LLImageRaw raw_image,
F32  decode_time,
S32  first_channel,
S32  max_channel 
) [virtual]

Reimplemented in LLImageJ2C.

Definition at line 1373 of file llimage.cpp.

References decode(), and llassert.

Here is the call graph for this function:

virtual BOOL LLImageFormatted::encode ( const LLImageRaw raw_image,
F32  encode_time 
) [pure virtual]

S8 LLImageFormatted::getCodec (  )  const

Definition at line 1527 of file llimage.cpp.

References mCodec.

Referenced by LLTextureFetchWorker::callbackCacheRead().

Here is the caller graph for this function:

BOOL LLImageFormatted::isDecoding (  )  const [inline]

Definition at line 283 of file llimage.h.

References FALSE, mDecoding, and TRUE.

BOOL LLImageFormatted::isDecoded (  )  const [inline]

Definition at line 284 of file llimage.h.

References FALSE, mDecoded, and TRUE.

void LLImageFormatted::setDiscardLevel ( S8  discard_level  )  [inline]

Definition at line 285 of file llimage.h.

References mDiscardLevel.

Referenced by LLImageJ2C::updateData(), and LLImageDXT::updateData().

Here is the caller graph for this function:

S8 LLImageFormatted::getDiscardLevel (  )  const [inline]

Definition at line 286 of file llimage.h.

References mDiscardLevel.

BOOL LLImageFormatted::copyData ( U8 data,
S32  size 
) [protected]

Definition at line 1424 of file llimage.cpp.

References allocateData(), deleteData(), LLImageBase::getData(), LLImageBase::getDataSize(), and TRUE.

Referenced by LLImageJ2COJ::encodeImpl().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 292 of file llimage.h.

Referenced by dump(), getCodec(), and sanityCheck().

Definition at line 294 of file llimage.h.

Referenced by dump(), isDecoded(), and sanityCheck().


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

Generated on Fri May 16 08:49:34 2008 for SecondLife by  doxygen 1.5.5