summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-06-17 16:26:26 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-06-17 16:26:26 -0700
commit6c121d4540cb4f916dd5fc6e18078e6cc11478bf (patch)
tree062533e68cd8f201450c5383ae78c0cdc5cd7fd6 /indra/newview/lltexturefetch.cpp
parenta6774820bc455160c6e7be70506aac205ca7eac2 (diff)
parentb022a9f15897cd3eb20f2c977e7c8e8f2660d27a (diff)
Merge
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r--indra/newview/lltexturefetch.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 52d227f827..ceed90e210 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -582,14 +582,26 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
LLMutexLock lock(&mWorkMutex);
- if ((mFetcher->isQuitting() || mImagePriority < 1.0f || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED)))
+ if ((mFetcher->isQuitting() || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED)))
{
if (mState < DECODE_IMAGE)
{
return true; // abort
}
}
-
+ if(mImagePriority < 1.0f)
+ {
+ if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR)
+ {
+ return true; // abort
+ }
+ }
+ if(mState > CACHE_POST && !mCanUseNET && !mCanUseHTTP)
+ {
+ //nowhere to get data, abort.
+ return true ;
+ }
+
if (mFetcher->mDebugPause)
{
return false; // debug: don't do any work
@@ -777,7 +789,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
// don't return, fall through to next state
}
- else if (mSentRequest == UNSENT)
+ else if (mSentRequest == UNSENT && mCanUseNET)
{
// Add this to the network queue and sit here.
// LLTextureFetch::update() will send off a request which will change our state
@@ -830,6 +842,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mState == SEND_HTTP_REQ)
{
+ if(mCanUseHTTP)
{
const S32 HTTP_QUEUE_MAX_SIZE = 8;
// *TODO: Integrate this with llviewerthrottle
@@ -895,6 +908,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
// fall through
}
+ else //can not use http fetch.
+ {
+ return true ; //abort
+ }
}
if (mState == WAIT_HTTP_REQ)