diff options
Diffstat (limited to 'linden/indra/newview/lltexturefetch.cpp')
-rw-r--r-- | linden/indra/newview/lltexturefetch.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 5cad14c..b5ad435 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp | |||
@@ -176,7 +176,7 @@ protected: | |||
176 | LLTextureFetchWorker(LLTextureFetch* fetcher, const LLUUID& id, const LLHost& host, | 176 | LLTextureFetchWorker(LLTextureFetch* fetcher, const LLUUID& id, const LLHost& host, |
177 | F32 priority, S32 discard, S32 size); | 177 | F32 priority, S32 discard, S32 size); |
178 | LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host, | 178 | LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host, |
179 | F32 priority, S32 discard, S32 size); | 179 | F32 priority, S32 discard, S32 size, bool can_use_http); |
180 | 180 | ||
181 | private: | 181 | private: |
182 | /*virtual*/ void startWork(S32 param); // called from addWork() (MAIN THREAD) | 182 | /*virtual*/ void startWork(S32 param); // called from addWork() (MAIN THREAD) |
@@ -388,7 +388,8 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, | |||
388 | const LLHost& host, // Simulator host | 388 | const LLHost& host, // Simulator host |
389 | F32 priority, // Priority | 389 | F32 priority, // Priority |
390 | S32 discard, // Desired discard | 390 | S32 discard, // Desired discard |
391 | S32 size) // Desired size | 391 | S32 size, // Desired size |
392 | bool can_use_http) // Try HTTP first | ||
392 | : LLWorkerClass(fetcher, "TextureFetch"), | 393 | : LLWorkerClass(fetcher, "TextureFetch"), |
393 | mState(INIT), | 394 | mState(INIT), |
394 | mWriteToCacheState(NOT_WRITE), | 395 | mWriteToCacheState(NOT_WRITE), |
@@ -420,7 +421,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, | |||
420 | mNeedsAux(FALSE), | 421 | mNeedsAux(FALSE), |
421 | mHaveAllData(FALSE), | 422 | mHaveAllData(FALSE), |
422 | mInLocalCache(FALSE), | 423 | mInLocalCache(FALSE), |
423 | mCanUseHTTP(true), | 424 | mCanUseHTTP(can_use_http), |
424 | mHTTPFailCount(0), | 425 | mHTTPFailCount(0), |
425 | mRetryAttempt(0), | 426 | mRetryAttempt(0), |
426 | mActiveCount(0), | 427 | mActiveCount(0), |
@@ -1506,7 +1507,7 @@ LLTextureFetch::~LLTextureFetch() | |||
1506 | } | 1507 | } |
1507 | 1508 | ||
1508 | bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, | 1509 | bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, |
1509 | S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux) | 1510 | S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) |
1510 | { | 1511 | { |
1511 | if (mDebugPause) | 1512 | if (mDebugPause) |
1512 | { | 1513 | { |
@@ -1568,6 +1569,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con | |||
1568 | worker->lockWorkMutex(); | 1569 | worker->lockWorkMutex(); |
1569 | worker->setImagePriority(priority); | 1570 | worker->setImagePriority(priority); |
1570 | worker->setDesiredDiscard(desired_discard, desired_size); | 1571 | worker->setDesiredDiscard(desired_discard, desired_size); |
1572 | worker->setCanUseHTTP(can_use_http); | ||
1571 | worker->unlockWorkMutex(); | 1573 | worker->unlockWorkMutex(); |
1572 | if (!worker->haveWork()) | 1574 | if (!worker->haveWork()) |
1573 | { | 1575 | { |
@@ -1583,7 +1585,7 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con | |||
1583 | } | 1585 | } |
1584 | else | 1586 | else |
1585 | { | 1587 | { |
1586 | worker = new LLTextureFetchWorker(this, url, id, host, priority, desired_discard, desired_size); | 1588 | worker = new LLTextureFetchWorker(this, url, id, host, priority, desired_discard, desired_size, can_use_http); |
1587 | mRequestMap[id] = worker; | 1589 | mRequestMap[id] = worker; |
1588 | } | 1590 | } |
1589 | worker->mActiveCount++; | 1591 | worker->mActiveCount++; |