Added LLTextureFetch::deleteAllRequests procedure. Called upon teleport.
This commit is contained in:
@@ -2183,6 +2183,23 @@ void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel, bo
|
||||
worker->scheduleDelete();
|
||||
}
|
||||
|
||||
void LLTextureFetch::deleteAllRequests()
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
lockQueue();
|
||||
if(mRequestMap.empty())
|
||||
{
|
||||
unlockQueue() ;
|
||||
break;
|
||||
}
|
||||
|
||||
LLTextureFetchWorker* worker = mRequestMap.begin()->second;
|
||||
|
||||
removeRequest(worker, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
S32 LLTextureFetch::getNumRequests()
|
||||
{
|
||||
lockQueue() ;
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
bool createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority,
|
||||
S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http);
|
||||
void deleteRequest(const LLUUID& id, bool cancel);
|
||||
void deleteAllRequests();
|
||||
bool getRequestFinished(const LLUUID& id, S32& discard_level,
|
||||
LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux);
|
||||
bool updateRequestPriority(const LLUUID& id, F32 priority);
|
||||
|
||||
@@ -714,6 +714,8 @@ void LLViewerTextureList::clearFetchingRequests()
|
||||
return;
|
||||
}
|
||||
|
||||
LLAppViewer::getTextureFetch()->deleteAllRequests();
|
||||
|
||||
for (image_priority_list_t::iterator iter = mImageList.begin();
|
||||
iter != mImageList.end(); ++iter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user