Bug 952893. Part 3: Tighten TimeVarying invariants so that GetAt always returns an end time when the value actually changes. r=padenot

* * *
Bug 952893 - Fix the rebase.
This commit is contained in:
Robert O'Callahan 2014-01-16 00:13:08 +13:00
parent dff42cfcd6
commit 8b105c15d6
2 changed files with 6 additions and 4 deletions

View File

@ -44,6 +44,9 @@ protected:
* The implementation records a mCurrent (the value at the current time)
* and an array of "change times" (greater than the current time) and the
* new value for each change time. This is a simple but dumb implementation.
* We maintain the invariant that each change entry in the array must have
* a different value to the value in the previous change entry (or, for
* the first change entry, mCurrent).
*/
template <typename Time, typename T, uint32_t ReservedChanges>
class TimeVarying : public TimeVaryingBase {
@ -79,6 +82,9 @@ public:
}
mChanges.RemoveElementAt(i);
}
if (mCurrent == aValue) {
return;
}
mChanges.InsertElementAt(0, Entry(aTime, aValue));
}
/**

View File

@ -93,16 +93,12 @@ private:
// Audio Channel Type.
AudioChannel mAudioChannel;
<<<<<<< /home/roc/mozilla-central/content/media/webaudio/AudioDestinationNode.h
bool mIsOffline;
bool mHasFinished;
=======
TimeStamp mStartedBlockingDueToBeingOnlyNode;
double mExtraCurrentTime;
double mExtraCurrentTimeSinceLastStartedBlocking;
bool mExtraCurrentTimeUpdatedSinceLastStableState;
>>>>>>> /tmp/AudioDestinationNode.h~other.MvuUBx
};
}