Apply fix from SNOW-792 for textures rebaking over and over.

This commit is contained in:
Player Dagostino
2011-08-02 20:21:02 +02:00
parent 53182cc4cb
commit a2313b026c

View File

@@ -1382,6 +1382,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false ; return false ;
} }
else
{
// UDP is not an option, we are dead
resetFormattedData();
return true; // failed
}
} }
else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE) else if (mGetStatus == HTTP_SERVICE_UNAVAILABLE)
{ {
@@ -1404,7 +1410,9 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mHTTPFailCount >= max_attempts) if (mHTTPFailCount >= max_attempts)
{ {
if (cur_size > 0) // Make max_attempts attempt at decoding what data we have,
// then bail forever on this image
if (cur_size > 0 && (mHTTPFailCount < (max_attempts+1)) )
{ {
// Use available data // Use available data
mLoadedDiscard = mFormattedImage->getDiscardLevel(); mLoadedDiscard = mFormattedImage->getDiscardLevel();
@@ -1413,9 +1421,21 @@ bool LLTextureFetchWorker::doWork(S32 param)
} }
else else
{ {
resetFormattedData(); //roll back to try UDP
mState = DONE; if(mCanUseNET)
return true; // failed {
mState = INIT ;
mCanUseHTTP = false ;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false ;
}
else
{
// UDP is not an option, we are dead
resetFormattedData();
mState = DONE;
return true; // failed
}
} }
} }
else else