summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-01-09 16:39:30 -0500
committerMonty Brandenberg <monty@lindenlab.com>2013-01-09 16:39:30 -0500
commitcc0a4bf6acafe759baaccea65022c963373ea012 (patch)
treed4fe1f1e34b1ab0d140a37c1f80d09034824d3e8 /indra/newview/lltexturefetch.cpp
parent11e506f2eb979a5ddfc3ca6f9c626771ab012a78 (diff)
parentcdd45b9abb35b40f2a31e7433fb99e588df8b40b (diff)
Merge. Pull viewer-development in prior to filing DRTVWR merge request.
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/lltexturefetch.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index cd4fa78cab..7de66b139f 100644..100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -50,6 +50,7 @@
#include "llviewertexture.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
+#include "llviewerstatsrecorder.h"
#include "llviewerassetstats.h"
#include "llworld.h"
#include "llsdutil.h"
@@ -2088,6 +2089,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
if (data_size > 0)
{
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
// *TODO: set the formatted image data here directly to avoid the copy
// Hold on to body for later copy
@@ -2162,6 +2164,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response,
mLoaded = TRUE;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ LLViewerStatsRecorder::instance().log(0.2f);
return data_size ;
}
@@ -3204,7 +3207,11 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8
return false;
}
- worker->lockWorkMutex(); // +Mw
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
+ LLViewerStatsRecorder::instance().log(0.1f);
+
+ worker->lockWorkMutex();
+
// Copy header data into image object
worker->mImageCodec = codec;
@@ -3251,8 +3258,12 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
mNetworkQueueMutex.unlock(); // -Mfnq
return false;
}
+
+ LLViewerStatsRecorder::instance().textureFetch(data_size);
+ LLViewerStatsRecorder::instance().log(0.1f);
+
+ worker->lockWorkMutex();
- worker->lockWorkMutex(); // +Mw
res = worker->insertPacket(packet_num, data, data_size);
@@ -4036,7 +4047,7 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time)
}
//collect statistics
- mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime;
+ mTotalFetchingTime = gTextureTimer.getElapsedTimeF32() - mTotalFetchingTime;
std::set<LLUUID> fetched_textures;
S32 size = mFetchingHistory.size();
@@ -4137,7 +4148,7 @@ void LLTextureFetchDebugger::tryToStopDebug()
mFetchingHistory.clear();
mHandleToFetchIndex.clear();
init();
- mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset
+ mTotalFetchingTime = gTextureTimer.getElapsedTimeF32(); //reset
}
}
}