From d65243063c42b6df809873e917259e7db8d21ed4 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 31 Jul 2013 21:21:58 -0600 Subject: fix for SH-4290: Running viewer with SceneLoadingMonitorEnabled causes viewer to be unresponsive on login on low end machine --- indra/newview/llscenemonitor.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 022a950ece..918b2271d1 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -211,11 +211,19 @@ LLRenderTarget& LLSceneMonitor::getCaptureTarget() void LLSceneMonitor::freezeAvatar(LLCharacter* avatarp) { - mAvatarPauseHandles.push_back(avatarp->requestPause()); + if(mEnabled) + { + mAvatarPauseHandles.push_back(avatarp->requestPause()); + } } void LLSceneMonitor::freezeScene() { + if(!mEnabled) + { + return; + } + //freeze all avatars for (std::vector::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) @@ -262,7 +270,7 @@ void LLSceneMonitor::capture() static LLCachedControl scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime"); static bool force_capture = true; - bool enabled = monitor_enabled || mDebugViewerVisible; + bool enabled = LLGLSLShader::sNoFixedFunction && (monitor_enabled || mDebugViewerVisible); if(mEnabled != enabled) { if(mEnabled) @@ -288,10 +296,9 @@ void LLSceneMonitor::capture() force_capture = true; } - if((mRecordingTimer.getElapsedTimeF32() > scene_load_sample_time() + if(mEnabled + && (mRecordingTimer.getElapsedTimeF32() > scene_load_sample_time() || force_capture) - && mEnabled - && LLGLSLShader::sNoFixedFunction && last_capture_frame != gFrameCount) { force_capture = false; -- cgit v1.2.3