summaryrefslogtreecommitdiff
path: root/indra/newview/lltextureinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltextureinfo.cpp')
-rwxr-xr-xindra/newview/lltextureinfo.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp
index fbe308595c..59d692b287 100755
--- a/indra/newview/lltextureinfo.cpp
+++ b/indra/newview/lltextureinfo.cpp
@@ -36,14 +36,14 @@ static LLTrace::CountStatHandle<S32> sTextureDownloadsCompleted("texture_downloa
static LLTrace::CountStatHandle<S32Bytes > sTextureDataDownloaded("texture_data_downloaded", "amount of texture data downloaded");
static LLTrace::CountStatHandle<U32Milliseconds > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures");
-LLTextureInfo::LLTextureInfo(bool postponeStartRecoreder) :
+LLTextureInfo::LLTextureInfo() :
mLogTextureDownloadsToViewerLog(false),
mLogTextureDownloadsToSimulator(false),
mTextureDownloadProtocol("NONE"),
mTextureLogThreshold(LLUnits::Kilobytes::fromValue(100))
{
- if (!postponeStartRecoreder)
- mRecording.start();
+ mTextures.clear();
+ mRecording.start();
}
void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold)
@@ -78,7 +78,15 @@ U32 LLTextureInfo::getTextureInfoMapSize()
bool LLTextureInfo::has(const LLUUID& id)
{
- return mTextures.end() != mTextures.find(id);
+ std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id);
+ if (iterator == mTextures.end())
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
}
void LLTextureInfo::setRequestStartTime(const LLUUID& id, U64 startTime)
@@ -184,13 +192,15 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microsecon
LLSD LLTextureInfo::getAverages()
{
LLSD averagedTextureData;
- S32 averageDownloadRate = 0;
+ S32 averageDownloadRate;
U32Milliseconds download_time = mRecording.getSum(sTexureDownloadTime);
- if(download_time != (U32Milliseconds)0)
+ if(download_time == (U32Milliseconds)0)
{
- if (0 != download_time.valueInUnits<LLUnits::Seconds>()) {
- averageDownloadRate = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bits>() / download_time.valueInUnits<LLUnits::Seconds>();
- }
+ averageDownloadRate = 0;
+ }
+ else
+ {
+ averageDownloadRate = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bits>() / download_time.valueInUnits<LLUnits::Seconds>();
}
averagedTextureData["bits_per_second"] = averageDownloadRate;
@@ -202,16 +212,6 @@ LLSD LLTextureInfo::getAverages()
return averagedTextureData;
}
-void LLTextureInfo::startRecording()
-{
- mRecording.start();
-}
-
-void LLTextureInfo::stopRecording()
-{
- mRecording.stop();
-}
-
void LLTextureInfo::resetTextureStatistics()
{
mRecording.restart();