diff options
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
| -rw-r--r-- | indra/newview/lltexturefetch.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 087761cbd0..93b5806acf 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -49,6 +49,7 @@ #include "llviewerregion.h" #include "llviewerstats.h" #include "llviewerstatsrecorder.h" +#include "llviewerthrottle.h" #include "llviewerassetstats.h" #include "llworld.h" #include "llsdparam.h" @@ -2434,7 +2435,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod mOriginFetchSource(LLTextureFetch::FROM_ALL), mTextureInfoMainThread(false) { - mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + mMaxBandwidth = LLViewerThrottle::getMaxBandwidthKbps(); mTextureInfo.setLogging(true); LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); @@ -2484,7 +2485,7 @@ LLTextureFetch::~LLTextureFetch() } S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority, - S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) + S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http) { LL_PROFILE_ZONE_SCOPED; if (mDebugPause) @@ -2496,13 +2497,13 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L { LL_DEBUGS("Avatar") << " requesting " << id << " " << w << "x" << h << " discard " << desired_discard << " type " << f_type << LL_ENDL; } - LLTextureFetchWorker* worker = getWorker(id) ; + LLTextureFetchWorker* worker = getWorker(id); if (worker) { if (worker->mHost != host) { LL_WARNS(LOG_TXT) << "LLTextureFetch::createRequest " << id << " called with multiple hosts: " - << host << " != " << worker->mHost << LL_ENDL; + << host << " != " << worker->mHost << LL_ENDL; removeRequest(worker, true); worker = NULL; return CREATE_REQUEST_ERROR_MHOSTS; @@ -2538,7 +2539,7 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L // we really do get it.) desired_size = MAX_IMAGE_DATA_SIZE; } - else if (w*h*c > 0) + else if (w * h * c > 0) { // If the requester knows the dimensions of the image, // this will calculate how much data we need without having to parse the header @@ -2596,14 +2597,15 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L worker->lockWorkMutex(); // +Mw worker->mActiveCount++; worker->mNeedsAux = needs_aux; - worker->setCanUseHTTP(can_use_http) ; + worker->setCanUseHTTP(can_use_http); worker->unlockWorkMutex(); // -Mw } LL_DEBUGS(LOG_TXT) << "REQUESTED: " << id << " f_type " << fttype_to_string(f_type) - << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL; + << " Discard: " << desired_discard << " size " << desired_size << LL_ENDL; return desired_discard; } + // Threads: T* // // protected @@ -2952,11 +2954,10 @@ void LLTextureFetch::commonUpdate() size_t LLTextureFetch::update(F32 max_time_ms) { LL_PROFILE_ZONE_SCOPED; - static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS", 3000.0); { mNetworkQueueMutex.lock(); // +Mfnq - mMaxBandwidth = band_width(); + mMaxBandwidth = LLViewerThrottle::getMaxBandwidthKbps(); add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, mHTTPTextureBits); mHTTPTextureBits = (U32Bits)0; |
