From 8bddaeec6647e735415f9bd72a4e1313e11fe720 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sat, 22 Jun 2013 12:00:18 -0700 Subject: fixed scene load monitor resetting to eagerly due to spurious camer amotion pulled swap() out of ui time block cleaned up internal lltrace dependencies, factored out common accumulator definitions --- indra/newview/llscenemonitor.cpp | 26 +++++++++++-------- indra/newview/llstartup.cpp | 54 ++++++++++++++++----------------------- indra/newview/llviewercamera.cpp | 2 +- indra/newview/llviewerdisplay.cpp | 15 ++++++++--- 4 files changed, 49 insertions(+), 48 deletions(-) (limited to 'indra/newview') 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 monitor_enabled(gSavedSettings, "SceneLoadingMonitorEnabled"); static LLCachedControl 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 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; -- cgit v1.3 From 808d3eff198d65e5a870abb670786935fc8356bd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 27 Jun 2013 00:07:21 -0700 Subject: SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console fixed some lltrace logic errors more consistent syncing of timestamps of sample values in recording stack selection of primary buffers was completely incorrect assignment of recordings got wrong play state due to implicit operator = defined in base class fixed asset stats only working up to the first send --- indra/llcommon/llfasttimer.h | 7 ---- indra/llcommon/lltraceaccumulators.cpp | 15 +++++++-- indra/llcommon/lltraceaccumulators.h | 37 ++++++++++++++------- indra/llcommon/lltracerecording.cpp | 7 ++-- indra/llcommon/lltracerecording.h | 6 ++++ indra/llcommon/lltracethreadrecorder.cpp | 57 ++++++++++++++++++++------------ indra/llcommon/lltracethreadrecorder.h | 2 +- indra/newview/llappviewer.cpp | 4 ++- indra/newview/llviewerassetstats.cpp | 15 +++++---- 9 files changed, 95 insertions(+), 55 deletions(-) (limited to 'indra/newview') diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 642c99ccce..ab8612a8ad 100755 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -38,13 +38,6 @@ class LLMutex; namespace LLTrace { -struct BlockTimerStackRecord -{ - class BlockTimer* mActiveTimer; - class TimeBlock* mTimeBlock; - U64 mChildTime; -}; - class ThreadTimerStack : public BlockTimerStackRecord, public LLThreadLocalSingleton diff --git a/indra/llcommon/lltraceaccumulators.cpp b/indra/llcommon/lltraceaccumulators.cpp index 5948696418..950c1d97d1 100644 --- a/indra/llcommon/lltraceaccumulators.cpp +++ b/indra/llcommon/lltraceaccumulators.cpp @@ -69,6 +69,16 @@ void AccumulatorBufferGroup::makePrimary() } } +//static +void AccumulatorBufferGroup::clearPrimary() +{ + AccumulatorBuffer::clearPrimary(); + AccumulatorBuffer::clearPrimary(); + AccumulatorBuffer::clearPrimary(); + AccumulatorBuffer::clearPrimary(); + AccumulatorBuffer::clearPrimary(); +} + bool AccumulatorBufferGroup::isPrimary() const { return mCounts.isPrimary(); @@ -102,11 +112,12 @@ void AccumulatorBufferGroup::reset(AccumulatorBufferGroup* other) mMemStats.reset(other ? &other->mMemStats : NULL); } -void AccumulatorBufferGroup::flush() +void AccumulatorBufferGroup::sync() { LLUnitImplicit time_stamp = LLTimer::getTotalSeconds(); - mSamples.flush(time_stamp); + mSamples.sync(time_stamp); + mMemStats.sync(time_stamp); } } diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index 7994dcc217..825cc9e3a8 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -109,12 +109,12 @@ namespace LLTrace } } - void flush(LLUnitImplicit time_stamp) + void sync(LLUnitImplicit time_stamp) { llassert(mStorageSize >= sNextStorageSlot); for (size_t i = 0; i < sNextStorageSlot; i++) { - mStorage[i].flush(time_stamp); + mStorage[i].sync(time_stamp); } } @@ -128,6 +128,11 @@ namespace LLTrace return LLThreadLocalSingletonPointer::getInstance() == mStorage; } + static void clearPrimary() + { + LLThreadLocalSingletonPointer::setInstance(NULL); + } + LL_FORCE_INLINE static ACCUMULATOR* getPrimaryStorage() { ACCUMULATOR* accumulator = LLThreadLocalSingletonPointer::getInstance(); @@ -302,7 +307,7 @@ namespace LLTrace mLastValue = other ? other->mLastValue : 0; } - void flush(LLUnitImplicit) {} + void sync(LLUnitImplicit) {} F64 getSum() const { return mSum; } F64 getMin() const { return mMin; } @@ -434,7 +439,7 @@ namespace LLTrace mHasValue = other ? other->mHasValue : false; } - void flush(LLUnitImplicit time_stamp) + void sync(LLUnitImplicit time_stamp) { LLUnitImplicit delta_time = time_stamp - mLastSampleTimeStamp; @@ -500,7 +505,7 @@ namespace LLTrace mSum = 0; } - void flush(LLUnitImplicit) {} + void sync(LLUnitImplicit) {} F64 getSum() const { return mSum; } @@ -535,7 +540,7 @@ namespace LLTrace TimeBlockAccumulator(); void addSamples(const self_t& other, bool /*append*/); void reset(const self_t* other); - void flush(LLUnitImplicit) {} + void sync(LLUnitImplicit) {} // // members @@ -566,6 +571,13 @@ namespace LLTrace bool mCollapsed; bool mNeedsSorting; }; + + struct BlockTimerStackRecord + { + class BlockTimer* mActiveTimer; + class TimeBlock* mTimeBlock; + U64 mChildTime; + }; struct MemStatAccumulator { @@ -611,16 +623,16 @@ namespace LLTrace mDeallocatedCount = 0; } - void flush(LLUnitImplicit time_stamp) + void sync(LLUnitImplicit time_stamp) { - mSize.flush(time_stamp); - mChildSize.flush(time_stamp); + mSize.sync(time_stamp); + mChildSize.sync(time_stamp); } SampleAccumulator mSize, - mChildSize; + mChildSize; int mAllocatedCount, - mDeallocatedCount; + mDeallocatedCount; }; struct AccumulatorBufferGroup : public LLRefCount @@ -630,11 +642,12 @@ namespace LLTrace void handOffTo(AccumulatorBufferGroup& other); void makePrimary(); bool isPrimary() const; + static void clearPrimary(); void append(const AccumulatorBufferGroup& other); void merge(const AccumulatorBufferGroup& other); void reset(AccumulatorBufferGroup* other = NULL); - void flush(); + void sync(); AccumulatorBuffer mCounts; AccumulatorBuffer mSamples; diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index c30f204fa4..0938317eaa 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -59,11 +59,12 @@ Recording& Recording::operator = (const Recording& other) mBuffers = other.mBuffers; - LLStopWatchControlsMixin::setPlayState(other_play_state); - // above call will clear mElapsedSeconds as a side effect, so copy it here mElapsedSeconds = other.mElapsedSeconds; mSamplingTimer = other.mSamplingTimer; + + setPlayState(other_play_state); + return *this; } @@ -82,7 +83,6 @@ void Recording::update() { mElapsedSeconds += mSamplingTimer.getElapsedTimeF64(); AccumulatorBufferGroup* buffers = mBuffers.write(); - buffers->flush(); LLTrace::get_thread_recorder()->bringUpToDate(buffers); mSamplingTimer.reset(); @@ -107,7 +107,6 @@ void Recording::handleStop() { mElapsedSeconds += mSamplingTimer.getElapsedTimeF64(); AccumulatorBufferGroup* buffers = mBuffers.write(); - buffers->flush(); LLTrace::get_thread_recorder()->deactivate(buffers); } diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 38eaa47f9f..355dbabb1c 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -81,6 +81,7 @@ class LLStopWatchControlsMixin : public LLStopWatchControlsMixinCommon { public: + typedef LLStopWatchControlsMixin self_t; virtual void splitTo(DERIVED& other) { @@ -98,6 +99,11 @@ public: static_cast(other).handleSplitTo(*static_cast(this)); } private: + self_t& operator = (const self_t& other) + { + // don't do anything, derived class must implement logic + } + // atomically stop this object while starting the other // no data can be missed in between stop and start virtual void handleSplitTo(DERIVED& other) {}; diff --git a/indra/llcommon/lltracethreadrecorder.cpp b/indra/llcommon/lltracethreadrecorder.cpp index c571e013e1..7192564c94 100644 --- a/indra/llcommon/lltracethreadrecorder.cpp +++ b/indra/llcommon/lltracethreadrecorder.cpp @@ -87,7 +87,7 @@ ThreadRecorder::~ThreadRecorder() delete[] mTimeBlockTreeNodes; } -TimeBlockTreeNode* ThreadRecorder::getTimeBlockTreeNode(S32 index) +TimeBlockTreeNode* ThreadRecorder::getTimeBlockTreeNode( S32 index ) { if (0 <= index && index < mNumTimeBlockTreeNodes) { @@ -99,10 +99,20 @@ TimeBlockTreeNode* ThreadRecorder::getTimeBlockTreeNode(S32 index) void ThreadRecorder::activate( AccumulatorBufferGroup* recording ) { + active_recording_list_t::reverse_iterator it, end_it; + for (it = mActiveRecordings.rbegin(), end_it = mActiveRecordings.rend(); + it != end_it; + ++it) + { + llassert((*it)->mTargetRecording != recording); + } + ActiveRecording* active_recording = new ActiveRecording(recording); if (!mActiveRecordings.empty()) { - mActiveRecordings.back()->mPartialRecording.handOffTo(active_recording->mPartialRecording); + AccumulatorBufferGroup& prev_active_recording = mActiveRecordings.back()->mPartialRecording; + prev_active_recording.sync(); + prev_active_recording.handOffTo(active_recording->mPartialRecording); } mActiveRecordings.push_back(active_recording); @@ -113,7 +123,7 @@ ThreadRecorder::active_recording_list_t::reverse_iterator ThreadRecorder::bringU { if (mActiveRecordings.empty()) return mActiveRecordings.rend(); - mActiveRecordings.back()->mPartialRecording.flush(); + mActiveRecordings.back()->mPartialRecording.sync(); TimeBlock::updateTimes(); active_recording_list_t::reverse_iterator it, end_it; @@ -156,18 +166,22 @@ void ThreadRecorder::deactivate( AccumulatorBufferGroup* recording ) active_recording_list_t::reverse_iterator it = bringUpToDate(recording); if (it != mActiveRecordings.rend()) { - // and if we've found the recording we wanted to update - active_recording_list_t::reverse_iterator next_it = it; - ++next_it; - if (next_it != mActiveRecordings.rend()) - { - (*next_it)->mPartialRecording.makePrimary(); - } - active_recording_list_t::iterator recording_to_remove = (++it).base(); + bool was_primary = (*recording_to_remove)->mPartialRecording.isPrimary(); llassert((*recording_to_remove)->mTargetRecording == recording); delete *recording_to_remove; mActiveRecordings.erase(recording_to_remove); + if (was_primary) + { + if (mActiveRecordings.empty()) + { + AccumulatorBufferGroup::clearPrimary(); + } + else + { + mActiveRecordings.back()->mPartialRecording.makePrimary(); + } + } } } @@ -202,7 +216,6 @@ SlaveThreadRecorder::~SlaveThreadRecorder() void SlaveThreadRecorder::pushToMaster() { { LLMutexLock lock(&mSharedRecordingMutex); - mThreadRecordingBuffers.flush(); LLTrace::get_thread_recorder()->bringUpToDate(&mThreadRecordingBuffers); mSharedRecordingBuffers.append(mThreadRecordingBuffers); } @@ -213,23 +226,25 @@ void SlaveThreadRecorder::pushToMaster() /////////////////////////////////////////////////////////////////////// static LLFastTimer::DeclareTimer FTM_PULL_TRACE_DATA_FROM_SLAVES("Pull slave trace data"); + void MasterThreadRecorder::pullFromSlaveThreads() { - LLFastTimer _(FTM_PULL_TRACE_DATA_FROM_SLAVES); + /*LLFastTimer _(FTM_PULL_TRACE_DATA_FROM_SLAVES); if (mActiveRecordings.empty()) return; { LLMutexLock lock(&mSlaveListMutex); - AccumulatorBufferGroup& target_recording_buffers = mActiveRecordings.back()->mPartialRecording; - for (slave_thread_recorder_list_t::iterator it = mSlaveThreadRecorders.begin(), end_it = mSlaveThreadRecorders.end(); - it != end_it; - ++it) - { LLMutexLock lock(&(*it)->mSharedRecordingMutex); + AccumulatorBufferGroup& target_recording_buffers = mActiveRecordings.back()->mPartialRecording; + target_recording_buffers.sync(); + for (slave_thread_recorder_list_t::iterator it = mSlaveThreadRecorders.begin(), end_it = mSlaveThreadRecorders.end(); + it != end_it; + ++it) + { LLMutexLock lock(&(*it)->mSharedRecordingMutex); - target_recording_buffers.merge((*it)->mSharedRecordingBuffers); - (*it)->mSharedRecordingBuffers.reset(); - } + target_recording_buffers.merge((*it)->mSharedRecordingBuffers); + (*it)->mSharedRecordingBuffers.reset(); } + }*/ } // called by slave thread diff --git a/indra/llcommon/lltracethreadrecorder.h b/indra/llcommon/lltracethreadrecorder.h index 0680c2c590..6b7a8e5865 100644 --- a/indra/llcommon/lltracethreadrecorder.h +++ b/indra/llcommon/lltracethreadrecorder.h @@ -71,6 +71,7 @@ namespace LLTrace class BlockTimer* mRootTimer; TimeBlockTreeNode* mTimeBlockTreeNodes; size_t mNumTimeBlockTreeNodes; + BlockTimerStackRecord mBlockTimerStackRecord; }; class LL_COMMON_API MasterThreadRecorder : public ThreadRecorder @@ -105,7 +106,6 @@ namespace LLTrace private: friend class MasterThreadRecorder; - MasterThreadRecorder* mMaster; LLMutex mSharedRecordingMutex; AccumulatorBufferGroup mSharedRecordingBuffers; MasterThreadRecorder& mMasterRecorder; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 733c9cc9df..7c5cd520da 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1294,6 +1294,8 @@ bool LLAppViewer::mainLoop() { LLFastTimer _(FTM_FRAME); LLTrace::TimeBlock::processTimes(); + llassert((LLTrace::get_frame_recording().getCurRecording().update(), + LLTrace::get_frame_recording().getCurRecording().getSampleCount(LLStatViewer::FPS) <= 1)); LLTrace::get_frame_recording().nextPeriod(); LLTrace::TimeBlock::logStats(); @@ -5617,6 +5619,6 @@ void LLAppViewer::metricsSend(bool enable_reporting) // Reset even if we can't report. Rather than gather up a huge chunk of // data, we'll keep to our sampling interval and retain the data // resolution in time. - gViewerAssetStats->reset(); + gViewerAssetStats->restart(); } diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index bada565d3d..af82b61dc8 100755 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -314,9 +314,9 @@ void LLViewerAssetStats::handleStop() } void LLViewerAssetStats::handleReset() - { +{ reset(); - } +} void LLViewerAssetStats::reset() @@ -328,6 +328,7 @@ void LLViewerAssetStats::reset() if (mRegionHandle) { mCurRecording = &mRegionRecordings[mRegionHandle]; + mCurRecording->setPlayState(getPlayState()); } } @@ -346,7 +347,7 @@ void LLViewerAssetStats::setRegion(region_handle_t region_handle) if (region_handle) { mCurRecording = &mRegionRecordings[region_handle]; - mCurRecording->start(); + mCurRecording->setPlayState(getPlayState()); } mRegionHandle = region_handle; @@ -493,19 +494,19 @@ void LLViewerAssetStats::getStats(AssetStats& stats, bool compact_output) } LLSD LLViewerAssetStats::asLLSD(bool compact_output) - { +{ LLParamSDParser parser; LLSD sd; AssetStats stats; getStats(stats, compact_output); LLInitParam::predicate_rule_t rule = LLInitParam::default_parse_rules(); if (!compact_output) - { + { rule.allow(LLInitParam::EMPTY); - } + } parser.writeSD(sd, stats, rule); return sd; - } +} // ------------------------------------------------------ // Global free-function definitions (LLViewerAssetStatsFF namespace) -- cgit v1.3