diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 26 | ||||
-rwxr-xr-x | indra/newview/llstartup.cpp | 54 | ||||
-rwxr-xr-x | indra/newview/llviewercamera.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerdisplay.cpp | 15 |
4 files changed, 49 insertions, 48 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index ed9eeb9330..a4d693ec0b 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -260,14 +260,7 @@ void LLSceneMonitor::capture() static LLCachedControl<bool> monitor_enabled(gSavedSettings, "SceneLoadingMonitorEnabled"); static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime"); static LLFrameTimer timer; - - if (mEnabled - && (mMonitorRecording.getSum(*LLViewerCamera::getVelocityStat()) > 0.1f - || mMonitorRecording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.05f)) - { - reset(); - freezeScene(); - } + static bool force_capture = true; bool enabled = monitor_enabled || mDebugViewerVisible; if(mEnabled != enabled) @@ -275,6 +268,7 @@ void LLSceneMonitor::capture() if(mEnabled) { unfreezeScene(); + force_capture = true; } else { @@ -285,11 +279,23 @@ void LLSceneMonitor::capture() mEnabled = enabled; } - if(timer.getElapsedTimeF32() > scene_load_sample_time() + if (mEnabled + && (mMonitorRecording.getSum(*LLViewerCamera::getVelocityStat()) > 0.1f + || mMonitorRecording.getSum(*LLViewerCamera::getAngularVelocityStat()) > 0.05f)) + { + reset(); + freezeScene(); + force_capture = true; + } + + if((timer.getElapsedTimeF32() > scene_load_sample_time() + || force_capture) && mEnabled && LLGLSLShader::sNoFixedFunction && last_capture_time != gFrameCount) { + force_capture = false; + mSceneLoadRecording.resume(); mMonitorRecording.resume(); @@ -479,12 +485,10 @@ void LLSceneMonitor::fetchQueryResult() if(mDiffResult > diff_threshold()) { mSceneLoadRecording.extend(); - llassert(mSceneLoadRecording.getAcceptedRecording().getLastRecording().getSum(LLStatViewer::FPS)); } else { mSceneLoadRecording.getPotentialRecording().nextPeriod(); - llassert(mSceneLoadRecording.getPotentialRecording().getLastRecording().getSum(LLStatViewer::FPS)); } } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index de8d549055..097ea7cc8d 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2054,6 +2054,7 @@ bool idle_startup() const F32 wearables_time = wearables_timer.getElapsedTimeF32(); static LLCachedControl<F32> max_wearables_time(gSavedSettings, "ClothingLoadingDelay"); + display_startup(); if (!gAgent.isGenderChosen() && isAgentAvatarValid()) { // No point in waiting for clothing, we don't even @@ -2067,50 +2068,39 @@ bool idle_startup() LLNotificationsUtil::add("WelcomeChooseSex", LLSD(), LLSD(), callback_choose_gender); LLStartUp::setStartupState( STATE_CLEANUP ); - return TRUE; } - - display_startup(); - - if (wearables_time > max_wearables_time()) + else if (wearables_time >= max_wearables_time()) { LLNotificationsUtil::add("ClothingLoading"); record(LLStatViewer::LOADING_WEARABLES_LONG_DELAY, wearables_time); LLStartUp::setStartupState( STATE_CLEANUP ); - return TRUE; } - - if (gAgent.isFirstLogin()) + else if (gAgent.isFirstLogin() + && isAgentAvatarValid() + && gAgentAvatarp->isFullyLoaded()) { // wait for avatar to be completely loaded - if (isAgentAvatarValid() - && gAgentAvatarp->isFullyLoaded()) - { - //llinfos << "avatar fully loaded" << llendl; - LLStartUp::setStartupState( STATE_CLEANUP ); - return TRUE; - } + //llinfos << "avatar fully loaded" << llendl; + LLStartUp::setStartupState( STATE_CLEANUP ); + } + // OK to just get the wearables + else if (!gAgent.isFirstLogin() && gAgentWearables.areWearablesLoaded() ) + { + // We have our clothing, proceed. + //llinfos << "wearables loaded" << llendl; + LLStartUp::setStartupState( STATE_CLEANUP ); } else { - // OK to just get the wearables - if ( gAgentWearables.areWearablesLoaded() ) - { - // We have our clothing, proceed. - //llinfos << "wearables loaded" << llendl; - LLStartUp::setStartupState( STATE_CLEANUP ); - return TRUE; - } + display_startup(); + update_texture_fetch(); + display_startup(); + set_startup_status(0.9f + 0.1f * wearables_time / max_wearables_time(), + LLTrans::getString("LoginDownloadingClothing").c_str(), + gAgent.mMOTD.c_str()); + display_startup(); } - - display_startup(); - update_texture_fetch(); - display_startup(); - set_startup_status(0.9f + 0.1f * wearables_time / max_wearables_time(), - LLTrans::getString("LoginDownloadingClothing").c_str(), - gAgent.mMOTD.c_str()); - display_startup(); - return TRUE; + //fall through this frame to STATE_CLEANUP } if (STATE_CLEANUP == LLStartUp::getStartupState()) diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index ebc4f09edb..57a0195d23 100755 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -155,7 +155,7 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 ¢er, setOriginAndLookAt(origin, up_direction, point_of_interest); - mVelocityDir = center - last_position ; + mVelocityDir = origin - last_position ; F32 dpos = mVelocityDir.normVec() ; LLQuaternion rotation; rotation.shortestArc(last_axis, getAtAxis()); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 1de8493749..ee5793fe6a 100755 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -106,6 +106,7 @@ LLFrameTimer gRecentMemoryTime; void pre_show_depth_buffer(); void post_show_depth_buffer(); void render_ui(F32 zoom_factor = 1.f, int subfield = 0); +void swap(); void render_hud_attachments(); void render_ui_3d(); void render_ui_2d(); @@ -344,7 +345,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Bail out if we're in the startup state and don't want to try to // render the world. // - if (LLStartUp::getStartupState() < STATE_STARTED) + if (LLStartUp::getStartupState() < STATE_WEARABLES_WAIT) { LLAppViewer::instance()->pingMainloopTimeout("Display:Startup"); display_startup(); @@ -553,6 +554,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLAppViewer::instance()->pingMainloopTimeout("Display:Disconnected"); render_ui(); + swap(); } ////////////////////////// @@ -1021,6 +1023,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLFastTimer t(FTM_RENDER_UI); render_ui(); + swap(); } @@ -1244,8 +1247,6 @@ BOOL setup_hud_matrices(const LLRect& screen_region) return TRUE; } -static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); - void render_ui(F32 zoom_factor, int subfield) { LLGLState::checkStates(); @@ -1322,10 +1323,16 @@ void render_ui(F32 zoom_factor, int subfield) glh_set_current_modelview(saved_view); gGL.popMatrix(); } +} + +static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); + +void swap() +{ + LLFastTimer t(FTM_SWAP); if (gDisplaySwapBuffers) { - LLFastTimer t(FTM_SWAP); gViewerWindow->getWindow()->swapBuffers(); } gDisplaySwapBuffers = TRUE; |