summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-07-19 15:03:05 -0700
committerRichard Linden <none@none>2013-07-19 15:03:05 -0700
commite40065f82c797eab41006a448c838f4f1089a2e8 (patch)
tree7abaeeae98304308bc3812531f682de3cda4bb72 /indra/newview
parenteb8d552df76540e7b0b533f0c10c5faa541299a4 (diff)
BUILDFIX: #include and dependency cleanup
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llscenemonitor.cpp14
-rw-r--r--indra/newview/llscenemonitor.h36
2 files changed, 23 insertions, 27 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index 3f4f872174..29dd140158 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -89,6 +89,7 @@ void LLSceneMonitor::reset()
mMonitorRecording.reset();
mSceneLoadRecording.reset();
+ mRecordingTimer.reset();
unfreezeScene();
@@ -259,7 +260,6 @@ void LLSceneMonitor::capture()
static U32 last_capture_frame = 0;
static LLCachedControl<bool> monitor_enabled(gSavedSettings, "SceneLoadingMonitorEnabled");
static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
- static LLFrameTimer timer;
static bool force_capture = true;
bool enabled = monitor_enabled || mDebugViewerVisible;
@@ -288,7 +288,7 @@ void LLSceneMonitor::capture()
force_capture = true;
}
- if((timer.getElapsedTimeF32() > scene_load_sample_time()
+ if((mRecordingTimer.getElapsedTimeF32() > scene_load_sample_time()
|| force_capture)
&& mEnabled
&& LLGLSLShader::sNoFixedFunction
@@ -299,8 +299,6 @@ void LLSceneMonitor::capture()
mSceneLoadRecording.resume();
mMonitorRecording.resume();
- timer.reset();
-
last_capture_frame = gFrameCount;
LLRenderTarget& cur_target = getCaptureTarget();
@@ -467,7 +465,6 @@ void LLSceneMonitor::fetchQueryResult()
// also throttle timing here, to avoid going below sample time due to phasing with frame capture
static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
- static LLFrameTimer timer;
if(mDiffState == WAIT_ON_RESULT
&& !LLAppViewer::instance()->quitRequested())
@@ -483,11 +480,11 @@ void LLSceneMonitor::fetchQueryResult()
mDiffResult = sqrtf(count * 0.5f / (mDiff->getWidth() * mDiff->getHeight() * mDiffPixelRatio * mDiffPixelRatio)); //0.5 -> (front face + back face)
- LL_DEBUGS("SceneMonitor") << "Frame difference: " << std::setprecision(4) << mDiffResult << LL_ENDL;
+ LL_DEBUGS("SceneMonitor") << "Frame difference: " << mDiffResult << LL_ENDL;
record(sFramePixelDiff, mDiffResult);
static LLCachedControl<F32> diff_threshold(gSavedSettings,"SceneLoadingPixelDiffThreshold");
- F32 elapsed_time = timer.getElapsedTimeF32();
+ F32 elapsed_time = mRecordingTimer.getElapsedTimeF32();
if (elapsed_time > scene_load_sample_time)
{
@@ -501,10 +498,9 @@ void LLSceneMonitor::fetchQueryResult()
{
mSceneLoadRecording.nextPeriod();
}
+ mRecordingTimer.reset();
}
}
-
- timer.reset();
}
}
diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h
index 7088d529d6..b857389243 100644
--- a/indra/newview/llscenemonitor.h
+++ b/indra/newview/llscenemonitor.h
@@ -72,8 +72,8 @@ private:
void generateDitheringTexture(S32 width, S32 height);
private:
- bool mEnabled;
- bool mDebugViewerVisible;
+ bool mEnabled,
+ mDebugViewerVisible;
enum EDiffState
{
@@ -82,27 +82,27 @@ private:
EXECUTE_DIFF,
WAIT_ON_RESULT,
VIEWER_QUITTING
- } mDiffState;
+ } mDiffState;
- LLRenderTarget* mFrames[2];
- LLRenderTarget* mDiff;
+ LLRenderTarget* mFrames[2];
+ LLRenderTarget* mDiff;
- GLuint mQueryObject; //used for glQuery
- F32 mDiffResult; //aggregate results of mDiff.
- F32 mDiffTolerance; //pixels are filtered out when R+G+B < mDiffTolerance
+ GLuint mQueryObject; //used for glQuery
+ F32 mDiffResult, //aggregate results of mDiff.
+ mDiffTolerance, //pixels are filtered out when R+G+B < mDiffTolerance
+ mDiffPixelRatio; //ratio of pixels used for comparison against the original mDiff size along one dimension
- F32 mDiffPixelRatio; //ratio of pixels used for comparison against the original mDiff size along one dimension
+ LLPointer<LLViewerTexture> mDitheringTexture;
+ S32 mDitherMatrixWidth;
+ F32 mDitherScale,
+ mDitherScaleS,
+ mDitherScaleT;
- LLPointer<LLViewerTexture> mDitheringTexture;
- S32 mDitherMatrixWidth;
- F32 mDitherScale;
- F32 mDitherScaleS;
- F32 mDitherScaleT;
+ std::vector<LLAnimPauseRequest> mAvatarPauseHandles;
- std::vector<LLAnimPauseRequest> mAvatarPauseHandles;
-
- LLTrace::ExtendablePeriodicRecording mSceneLoadRecording;
- LLTrace::Recording mMonitorRecording;
+ LLFrameTimer mRecordingTimer;
+ LLTrace::ExtendablePeriodicRecording mSceneLoadRecording;
+ LLTrace::Recording mMonitorRecording;
};
class LLSceneMonitorView : public LLFloater