summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r--indra/newview/lltexturefetch.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index b1b3ae473c..2ea6e5936d 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -292,7 +292,10 @@ public:
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer)
{
- if ((gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog")) || (gSavedSettings.getBOOL("LogTextureDownloadsToSimulator")))
+ static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
+ static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
+
+ if (log_to_viewer_log || log_to_sim)
{
mFetcher->mTextureInfo.setRequestStartTime(mID, mStartTime);
U64 timeNow = LLTimer::getTotalTime();
@@ -571,7 +574,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if ((mFetcher->isQuitting() || mImagePriority < 1.0f || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED)))
{
- if (mState < WRITE_TO_CACHE)
+ if (mState < DECODE_IMAGE)
{
return true; // abort
}
@@ -715,10 +718,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mState == LOAD_FROM_NETWORK)
{
- bool get_url = gSavedSettings.getBOOL("ImagePipelineUseHTTP");
- if (!mUrl.empty()) get_url = false;
+ static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP");
+
// if (mHost != LLHost::invalid) get_url = false;
- if ( get_url )
+ if ( use_http && mUrl.empty())//get http url.
{
LLViewerRegion* region = NULL;
if (mHost == LLHost::invalid)
@@ -1717,7 +1720,8 @@ S32 LLTextureFetch::update(U32 max_time_ms)
{
S32 res;
- mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
+ static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS");
+ mMaxBandwidth = band_width ;
res = LLWorkerThread::update(max_time_ms);
@@ -1923,7 +1927,9 @@ void LLTextureFetch::sendRequestListToSimulators()
// llinfos << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard
// << " Packet: " << packet << " Priority: " << req->mImagePriority << llendl;
- if ((gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog")) || (gSavedSettings.getBOOL("LogTextureDownloadsToSimulator")))
+ static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
+ static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
+ if (log_to_viewer_log || log_to_sim)
{
mTextureInfo.setRequestStartTime(req->mID, LLTimer::getTotalTime());
mTextureInfo.setRequestOffset(req->mID, 0);
@@ -2144,7 +2150,10 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
if(packet_num >= (worker->mTotalPackets - 1))
{
- if ((gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog")) || (gSavedSettings.getBOOL("LogTextureDownloadsToSimulator")))
+ static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
+ static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
+
+ if (log_to_viewer_log || log_to_sim)
{
U64 timeNow = LLTimer::getTotalTime();
mTextureInfo.setRequestSize(id, worker->mFileSize);