summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-10-10 19:25:56 -0700
committerRichard Linden <none@none>2012-10-10 19:25:56 -0700
commit74ac0182ec8f7a0f6d0ea89f5814f0998ab90b62 (patch)
treeaa8e0b6b231c3eb24719b884a8e951b217ca60e7 /indra/newview/llviewertexturelist.cpp
parent960f8764ad2407add941bc8650b295f1e77beb19 (diff)
SH-3405 WIP convert existing stats to lltrace system
fixed units conversion so that trace getters return convertable units removed circular dependencies from lltrace* converted more stats to lltrace
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r--indra/newview/llviewertexturelist.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index de3dd3c1c6..b22c0c797e 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -58,14 +58,13 @@
#include "pipeline.h"
#include "llappviewer.h"
#include "llxuiparser.h"
+#include "lltracethreadrecorder.h"
#include "llviewerdisplay.h"
////////////////////////////////////////////////////////////////////////////
void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL;
-U32 LLViewerTextureList::sTextureBits = 0;
-U32 LLViewerTextureList::sTexturePackets = 0;
S32 LLViewerTextureList::sNumImages = 0;
LLStat LLViewerTextureList::sNumImagesStat("Num Images", TRUE);
LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", TRUE);
@@ -624,7 +623,7 @@ void LLViewerTextureList::updateImages(F32 max_time)
LLTrace::Recording* recording = LLTrace::get_thread_recorder()->getPrimaryRecording();
- LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(LLStatViewer::TEXTURE_KBIT));
+ LLAppViewer::getTextureFetch()->setTextureBandwidth(recording->getPerSec(LLStatViewer::TEXTURE_KBIT).get());
LLViewerStats::getInstance()->mNumImagesStat.addValue(sNumImages);
LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
@@ -1326,8 +1325,8 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
{
received_size = msg->getReceiveSize() ;
}
- gTextureList.sTextureBits += received_size * 8;
- gTextureList.sTexturePackets++;
+ LLStatViewer::TEXTURE_KBIT.add<LLUnits::Bytes<F32> >(received_size);
+ LLStatViewer::TEXTURE_PACKETS.add(1);
U8 codec;
U16 packets;
@@ -1399,8 +1398,9 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
{
received_size = msg->getReceiveSize() ;
}
- gTextureList.sTextureBits += received_size * 8;
- gTextureList.sTexturePackets++;
+
+ LLStatViewer::TEXTURE_KBIT.add<LLUnits::Bytes<F32> >(received_size);
+ LLStatViewer::TEXTURE_PACKETS.add(1);
//llprintline("Start decode, image header...");
msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id);