Added LLTextureFetch::deleteAllRequests procedure. Called upon teleport.

This commit is contained in:
Shyotl
2012-11-09 18:45:57 -06:00
parent 1cb75c4471
commit 1cdc11dae2
3 changed files with 20 additions and 0 deletions

View File

@@ -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() ;