From 3f2de87340b1c831ea59e4a3ca960d49f343c9fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 17 Jun 2013 01:18:21 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics added getAs and setAs to LLUnit to make it clearer how you specify units removed accidental 0-based indexing of periodicRecording history... should now be consistently 1-based, with 0 accessing current active recording removed per frame timer updates of all historical timer bars in fast timer display added missing assignment operator to recordings --- indra/llcommon/lltracerecording.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'indra/llcommon/lltracerecording.cpp') diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index ff90da3822..f2c5941011 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -121,22 +121,27 @@ Recording::Recording() } Recording::Recording( const Recording& other ) +{ + *this = other; +} + +Recording& Recording::operator = (const Recording& other) { // this will allow us to seamlessly start without affecting any data we've acquired from other setPlayState(PAUSED); Recording& mutable_other = const_cast(other); + mutable_other.update(); EPlayState other_play_state = other.getPlayState(); - mutable_other.pause(); - mBuffers = other.mBuffers; + mBuffers = mutable_other.mBuffers; LLStopWatchControlsMixin::setPlayState(other_play_state); - mutable_other.setPlayState(other_play_state); // above call will clear mElapsedSeconds as a side effect, so copy it here mElapsedSeconds = other.mElapsedSeconds; mSamplingTimer = other.mSamplingTimer; + return *this; } @@ -444,12 +449,8 @@ void PeriodicRecording::nextPeriod() void PeriodicRecording::appendRecording(Recording& recording) { - // if I have a recording of any length, then close it off and start a fresh one - if (getCurRecording().getDuration().value()) - { - nextPeriod(); - } getCurRecording().appendRecording(recording); + nextPeriod(); } @@ -460,12 +461,6 @@ void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other ) getCurRecording().update(); other.getCurRecording().update(); - // if I have a recording of any length, then close it off and start a fresh one - if (getCurRecording().getDuration().value()) - { - nextPeriod(); - } - if (mAutoResize) { S32 other_index = (other.mCurPeriod + 1) % other.mRecordingPeriods.size(); -- cgit v1.2.3