summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2010-12-13 18:29:31 -0800
committerDon Kjer <don@lindenlab.com>2010-12-13 18:29:31 -0800
commit01c13c3b9403991c04166f6ac57c93aaf5f17f83 (patch)
tree614140e65ef00f90682c01fdf9dc451a27641769
parentb71b9ee08e0b59274346a3b4da2c33ff84a5eb90 (diff)
Added in-world color coding to objects based on update type
-rw-r--r--indra/newview/llviewerobjectlist.cpp32
-rw-r--r--indra/newview/llviewerstatsrecorder.cpp7
-rw-r--r--indra/newview/llviewerstatsrecorder.h2
3 files changed, 39 insertions, 2 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 64949ecc44..285f067b0e 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -554,6 +554,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
llwarns << "Dead object " << objectp->mID << " in UUID map 1!" << llendl;
}
+ bool bCached = false;
if (compressed)
{
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
@@ -564,6 +565,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only?
{
LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp);
+ bCached = true;
#if LL_RECORD_VIEWER_STATS
LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp);
#endif
@@ -584,6 +586,36 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
}
#if LL_RECORD_VIEWER_STATS
LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp);
+ F32 color_strength = llmin((LLViewerStatsRecorder::instance()->getTimeSinceStart() / 1000.0f) + 64.0f, 255.0f);
+ LLColor4 color;
+ switch (update_type)
+ {
+ case OUT_FULL:
+ color[VGREEN] = color_strength;
+ break;
+ case OUT_TERSE_IMPROVED:
+ color[VGREEN] = color_strength;
+ color[VBLUE] = color_strength;
+ break;
+ case OUT_FULL_COMPRESSED:
+ color[VRED] = color_strength;
+ if (!bCached)
+ {
+ color[VGREEN] = color_strength;
+ }
+ break;
+ case OUT_FULL_CACHED:
+ color[VBLUE] = color_strength;
+ break;
+ default:
+ llwarns << "Unknown update_type " << update_type << llendl;
+ break;
+ };
+ U8 te;
+ for (te = 0; te < objectp->getNumTEs(); ++te)
+ {
+ objectp->setTEColor(te, color);
+ }
#endif
}
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index b6ef260b6a..a8d1565742 100644
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -221,10 +221,9 @@ void LLViewerStatsRecorder::endObjectUpdateEvents()
total_objects > 0)
{
std::ostringstream data_msg;
- F32 now32 = (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0);
F32 processing32 = (F32) ((LLTimer::getTotalTime() - mProcessingTime) / 1000.0);
- data_msg << now32
+ data_msg << getTimeSinceStart()
<< ", " << processing32
<< ", " << mObjectCacheHitCount
<< ", " << mObjectCacheMissFullCount
@@ -246,5 +245,9 @@ void LLViewerStatsRecorder::endObjectUpdateEvents()
clearStats();
}
+F32 LLViewerStatsRecorder::getTimeSinceStart()
+{
+ return (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0);
+}
diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h
index 16e04fb11e..f9ccdd6e78 100644
--- a/indra/newview/llviewerstatsrecorder.h
+++ b/indra/newview/llviewerstatsrecorder.h
@@ -64,6 +64,8 @@ class LLViewerStatsRecorder
void recordRequestCacheMissesEvent(S32 count);
void endObjectUpdateEvents();
+ F32 getTimeSinceStart();
+
private:
static LLViewerStatsRecorder* sInstance;