LLTextureFetch Class Reference

#include <lltexturefetch.h>

Inheritance diagram for LLTextureFetch:

Inheritance graph
[legend]
Collaboration diagram for LLTextureFetch:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLTextureFetch (LLTextureCache *cache, bool threaded)
 ~LLTextureFetch ()
S32 update (U32 max_time_ms)
bool createRequest (const LLUUID &id, const LLHost &host, F32 priority, S32 w, S32 h, S32 c, S32 discard, bool needs_aux)
bool createRequest (const LLString &filename, const LLUUID &id, const LLHost &host, F32 priority, S32 w, S32 h, S32 c, S32 discard, bool needs_aux)
void deleteRequest (const LLUUID &id, bool cancel)
bool getRequestFinished (const LLUUID &id, S32 &discard_level, LLPointer< LLImageRaw > &raw, LLPointer< LLImageRaw > &aux)
bool updateRequestPriority (const LLUUID &id, F32 priority)
bool receiveImageHeader (const LLHost &host, const LLUUID &id, U8 codec, U16 packets, U32 totalbytes, U16 data_size, U8 *data)
bool receiveImagePacket (const LLHost &host, const LLUUID &id, U16 packet_num, U16 data_size, U8 *data)
S32 getFetchState (const LLUUID &id, F32 &decode_progress_p, F32 &requested_priority_p, U32 &fetch_priority_p, F32 &fetch_dtime_p, F32 &request_dtime_p)
void dump ()
S32 getNumRequests ()
void lockQueue ()
void unlockQueue ()
LLTextureFetchWorkergetWorker (const LLUUID &id)

Public Attributes

LLUUID mDebugID
S32 mDebugCount
BOOL mDebugPause
S32 mPacketCount
S32 mBadPacketCount

Protected Member Functions

void addToNetworkQueue (LLTextureFetchWorker *worker)
void removeFromNetworkQueue (LLTextureFetchWorker *worker)
void removeRequest (LLTextureFetchWorker *worker, bool cancel)

Private Types

typedef std::map< LLUUID,
LLTextureFetchWorker * > 
map_t
typedef std::set< LLUUIDqueue_t
typedef std::map< LLHost,
std::set< LLUUID > > 
cancel_queue_t

Private Member Functions

void sendRequestListToSimulators ()

Private Attributes

LLMutex mQueueMutex
LLTextureCachemTextureCache
map_t mRequestMap
queue_t mNetworkQueue
cancel_queue_t mCancelQueue
LLFrameTimer mNetworkTimer

Friends

class LLTextureFetchWorker


Detailed Description

Definition at line 46 of file lltexturefetch.h.


Member Typedef Documentation

typedef std::map<LLUUID,LLTextureFetchWorker*> LLTextureFetch::map_t [private]

Definition at line 100 of file lltexturefetch.h.

typedef std::set<LLUUID> LLTextureFetch::queue_t [private]

Definition at line 104 of file lltexturefetch.h.

typedef std::map<LLHost,std::set<LLUUID> > LLTextureFetch::cancel_queue_t [private]

Definition at line 106 of file lltexturefetch.h.


Constructor & Destructor Documentation

LLTextureFetch::LLTextureFetch ( LLTextureCache cache,
bool  threaded 
)

Definition at line 1297 of file lltexturefetch.cpp.

LLTextureFetch::~LLTextureFetch (  ) 

Definition at line 1308 of file lltexturefetch.cpp.


Member Function Documentation

S32 LLTextureFetch::update ( U32  max_time_ms  )  [virtual]

Reimplemented from LLWorkerThread.

Definition at line 1535 of file lltexturefetch.cpp.

References LLFrameTimer::getElapsedTimeF32(), mNetworkTimer, LLFrameTimer::reset(), S32, sendRequestListToSimulators(), and LLWorkerThread::update().

Referenced by LLAppViewer::cleanup(), LLViewerImageList::decodeAllImages(), LLAppViewer::mainLoop(), and update_texture_fetch().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLTextureFetch::createRequest ( const LLUUID id,
const LLHost host,
F32  priority,
S32  w,
S32  h,
S32  c,
S32  discard,
bool  needs_aux 
)

Definition at line 1313 of file lltexturefetch.cpp.

References LLStringBase< char >::null.

Referenced by LLViewerImage::updateFetch().

Here is the caller graph for this function:

bool LLTextureFetch::createRequest ( const LLString filename,
const LLUUID id,
const LLHost host,
F32  priority,
S32  w,
S32  h,
S32  c,
S32  discard,
bool  needs_aux 
)

void LLTextureFetch::deleteRequest ( const LLUUID id,
bool  cancel 
)

Definition at line 1408 of file lltexturefetch.cpp.

References getWorker(), mQueueMutex, and removeRequest().

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLTextureFetch::getRequestFinished ( const LLUUID id,
S32 discard_level,
LLPointer< LLImageRaw > &  raw,
LLPointer< LLImageRaw > &  aux 
)

bool LLTextureFetch::updateRequestPriority ( const LLUUID id,
F32  priority 
)

Definition at line 1517 of file lltexturefetch.cpp.

References getWorker(), LLTextureFetchWorker::lockWorkData(), mQueueMutex, LLTextureFetchWorker::setImagePriority(), and LLTextureFetchWorker::unlockWorkData().

Referenced by LLViewerImage::updateFetch().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLTextureFetch::receiveImageHeader ( const LLHost host,
const LLUUID id,
U8  codec,
U16  packets,
U32  totalbytes,
U16  data_size,
U8 data 
)

bool LLTextureFetch::receiveImagePacket ( const LLHost host,
const LLUUID id,
U16  packet_num,
U16  data_size,
U8 data 
)

S32 LLTextureFetch::getFetchState ( const LLUUID id,
F32 decode_progress_p,
F32 requested_priority_p,
U32 fetch_priority_p,
F32 fetch_dtime_p,
F32 request_dtime_p 
)

void LLTextureFetch::dump (  ) 

S32 LLTextureFetch::getNumRequests (  )  [inline]

Definition at line 72 of file lltexturefetch.h.

References mRequestMap.

Referenced by LLGLTexMemBar::draw().

Here is the caller graph for this function:

void LLTextureFetch::lockQueue (  )  [inline]

Definition at line 75 of file lltexturefetch.h.

References LLMutex::lock(), and mQueueMutex.

Referenced by LLTextureFetchWorker::DecodeResponder::completed(), LLTextureFetchWorker::CacheWriteResponder::completed(), LLTextureFetchWorker::CacheReadResponder::completed(), and LLTextureFetchWorker::doWork().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLTextureFetch::unlockQueue (  )  [inline]

Definition at line 76 of file lltexturefetch.h.

References mQueueMutex, and LLMutex::unlock().

Referenced by LLTextureFetchWorker::DecodeResponder::completed(), LLTextureFetchWorker::CacheWriteResponder::completed(), LLTextureFetchWorker::CacheReadResponder::completed(), and LLTextureFetchWorker::doWork().

Here is the call graph for this function:

Here is the caller graph for this function:

LLTextureFetchWorker * LLTextureFetch::getWorker ( const LLUUID id  ) 

void LLTextureFetch::addToNetworkQueue ( LLTextureFetchWorker worker  )  [protected]

Definition at line 1421 of file lltexturefetch.cpp.

References mCancelQueue, LLTextureFetchWorker::mID, mNetworkQueue, and mRequestMap.

Referenced by LLTextureFetchWorker::doWork().

Here is the caller graph for this function:

void LLTextureFetch::removeFromNetworkQueue ( LLTextureFetchWorker worker  )  [protected]

Definition at line 1437 of file lltexturefetch.cpp.

References LLTextureFetchWorker::mID, and mNetworkQueue.

Referenced by LLTextureFetchWorker::doWork(), and receiveImagePacket().

Here is the caller graph for this function:

void LLTextureFetch::removeRequest ( LLTextureFetchWorker worker,
bool  cancel 
) [protected]

Definition at line 1443 of file lltexturefetch.cpp.

References mCancelQueue, LLTextureFetchWorker::mHost, LLTextureFetchWorker::mID, mNetworkQueue, mRequestMap, and LLWorkerClass::scheduleDelete().

Referenced by createRequest(), and deleteRequest().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLTextureFetch::sendRequestListToSimulators (  )  [private]

Definition at line 1555 of file lltexturefetch.cpp.

References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_DiscardLevel, _PREHASH_DownloadPriority, _PREHASH_Image, _PREHASH_Packet, _PREHASH_RequestImage, _PREHASH_SessionID, _PREHASH_Type, LLMessageSystem::addF32Fast(), LLMessageSystem::addS8Fast(), LLMessageSystem::addU32Fast(), LLMessageSystem::addU8Fast(), LLMessageSystem::addUUIDFast(), gAgent, LLControlGroup::getBOOL(), LLViewerRegion::getCapability(), LLFrameTimer::getElapsedTimeF32(), LLAgent::getID(), LLAgent::getRegion(), LLAgent::getRegionHost(), LLAgent::getSessionID(), getWorker(), gMessageSystem, gSavedSettings, IMAGES_PER_REQUEST, LLHost::invalid, llabs(), LLTextureFetchWorker::lockWorkData(), mCancelQueue, mDebugCount, mDebugID, LLTextureFetchWorker::mDesiredDiscard, LLTextureFetchWorker::mHost, LLTextureFetchWorker::mID, LLTextureFetchWorker::mImagePriority, LLTextureFetchWorker::mLastPacket, mNetworkQueue, mQueueMutex, LLTextureFetchWorker::mRequestedPriority, LLTextureFetchWorker::mRequestedTimer, LLTextureFetchWorker::mSentRequest, LLTextureFetchWorker::mSimRequestedDiscard, LLTextureFetchWorker::mTotalPackets, LLTextureFetchWorker::mType, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), NULL, LLFrameTimer::reset(), S32, LLMessageSystem::sendSemiReliable(), LLTextureFetchWorker::SENT_SIM, and LLTextureFetchWorker::unlockWorkData().

Referenced by update().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class LLTextureFetchWorker [friend]

Definition at line 48 of file lltexturefetch.h.

Referenced by createRequest().


Member Data Documentation

Definition at line 91 of file lltexturefetch.h.

Referenced by LLGLTexMemBar::draw(), receiveImageHeader(), and receiveImagePacket().

Definition at line 92 of file lltexturefetch.h.

Referenced by LLGLTexMemBar::draw(), receiveImageHeader(), and receiveImagePacket().

Definition at line 109 of file lltexturefetch.h.

Referenced by update().


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

Generated on Fri May 16 09:14:58 2008 for SecondLife by  doxygen 1.5.5