diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-01-16 10:39:23 -0700 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-01-16 10:39:23 -0700 |
| commit | f740faf760cedec5b72928224b386c0dc8a3dd6e (patch) | |
| tree | a4f7d17f88306af89badea6b03e417ef12587b23 /indra/newview/llscenemonitor.cpp | |
| parent | 670d03ceb83b92c9bb98d10bb37fba6f75971a2f (diff) | |
| parent | 45a7fe901aa4cd7af14fa1cb894da46a988e3aa2 (diff) | |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra/newview/llscenemonitor.cpp')
| -rw-r--r-- | indra/newview/llscenemonitor.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 189697dcf0..bafd245aa0 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -37,6 +37,7 @@ #include "llwindow.h" #include "llpointer.h" #include "llspatialpartition.h" +#include "llagent.h" LLSceneMonitorView* gSceneMonitorView = NULL; @@ -67,7 +68,10 @@ LLSceneMonitor::LLSceneMonitor() : mDiffPixelRatio(0.5f) { mFrames[0] = NULL; - mFrames[1] = NULL; + mFrames[1] = NULL; + + mRecording = new LLTrace::ExtendableRecording(); + mRecording->start(); } LLSceneMonitor::~LLSceneMonitor() @@ -78,6 +82,9 @@ LLSceneMonitor::~LLSceneMonitor() void LLSceneMonitor::destroyClass() { reset(); + + delete mRecording; + mRecording = NULL; } void LLSceneMonitor::reset() @@ -137,6 +144,11 @@ bool LLSceneMonitor::preCapture() return false; } + if(gAgent.isPositionChanged()) + { + mRecording->reset(); + } + if(timer.getElapsedTimeF32() < mSamplingTime) { return false; @@ -388,6 +400,10 @@ void LLSceneMonitor::fetchQueryResult() mDiffResult = count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio); //0.5 -> (front face + back face) + if(mDiffResult > 0.01f) + { + mRecording->extend(); + } //llinfos << count << " : " << mDiffResult << llendl; } //------------------------------------------------------------------------------------------------------------- @@ -454,6 +470,11 @@ void LLSceneMonitorView::draw() num_str = llformat("Sampling time: %.3f seconds", LLSceneMonitor::getInstance()->getSamplingTime()); LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP); + lines++; + + num_str = llformat("Scene Loading time: %.3f seconds", (F32)LLSceneMonitor::getInstance()->getRecording()->getAcceptedRecording().getDuration().value()); + LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, 5, getRect().getHeight() - line_height * lines, color, LLFontGL::LEFT, LLFontGL::TOP); + lines++; LLView::draw(); } |
