summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llscenemonitor.cpp14
-rw-r--r--indra/newview/llscenemonitor.h2
2 files changed, 5 insertions, 11 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 2e819c8efe..9546c786d1 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -50,7 +50,7 @@ LLSceneMonitorView* gSceneMonitorView = NULL;
//2, (?) disable all sky and water;
//3, capture frames periodically, by calling "capture()";
//4, compute pixel differences between two latest captured frames, by calling "compare()", results are stored at mDiff;
-//5, compute the number of pixels in mDiff above some tolerance threshold in GPU, by calling "queryDiff() -> calcDiffAggregate()";
+//5, compute the number of pixels in mDiff above some tolerance threshold in GPU, by calling "calcDiffAggregate()";
//6, use gl occlusion query to fetch the result from GPU, by calling "fetchQueryResult()";
//END.
//
@@ -402,17 +402,10 @@ void LLSceneMonitor::compare()
mHasNewDiff = true;
- queryDiff();
-}
-
-void LLSceneMonitor::queryDiff()
-{
- if(mDebugViewerVisible)
+ if (!mDebugViewerVisible)
{
- return;
+ calcDiffAggregate();
}
-
- calcDiffAggregate();
}
//calculate Diff aggregate information in GPU, and enable gl occlusion query to capture it.
@@ -492,6 +485,7 @@ void LLSceneMonitor::fetchQueryResult()
mDiffResult = count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio); //0.5 -> (front face + back face)
+ LL_DEBUGS("SceneMonitor") << "Frame difference: " << mDiffResult << LL_ENDL;
sample(sFramePixelDiff, mDiffResult);
const F32 diff_threshold = 0.001f;
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index 08d2335a90..6dccbbe335 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -39,6 +39,7 @@ class LLViewerTexture;
class LLSceneMonitor : public LLSingleton<LLSceneMonitor>
{
+ LOG_CLASS(LLSceneMonitor);
public:
LLSceneMonitor();
~LLSceneMonitor();
@@ -50,7 +51,6 @@ public:
void capture(); //capture the main frame buffer
void compare(); //compare the stored two buffers.
- void queryDiff();
void fetchQueryResult();
void calcDiffAggregate();
void setDiffTolerance(F32 tol) {mDiffTolerance = tol;}