Bug 1304336. Part 2 - remove unused canonical/mirror. r=kikuo

MozReview-Commit-ID: 9rQcTTrW4Cn

--HG--
extra : rebase_source : 5473db2bd2f7da5a6536368cd78deac1ea0cde8c
This commit is contained in:
JW Wang 2016-09-21 18:11:00 +08:00
Родитель 6f9627664f
Коммит 5fd2401d63
4 изменённых файлов: 1 добавлений и 13 удалений

Просмотреть файл

@ -525,7 +525,6 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
, INIT_MIRROR(mPlaybackPosition, 0)
, INIT_MIRROR(mIsAudioDataAudible, false)
, INIT_CANONICAL(mVolume, 0.0)
, INIT_CANONICAL(mPlaybackRate, 1.0)
, INIT_CANONICAL(mPreservesPitch, true)
, INIT_CANONICAL(mEstimatedDuration, NullableTimeUnit())
, INIT_CANONICAL(mExplicitDuration, Maybe<double>())

Просмотреть файл

@ -764,7 +764,7 @@ protected:
Canonical<double> mVolume;
// PlaybackRate and pitch preservation status we should start at.
Canonical<double> mPlaybackRate;
double mPlaybackRate = 1;
Canonical<bool> mPreservesPitch;
@ -827,9 +827,6 @@ public:
AbstractCanonical<double>* CanonicalVolume() {
return &mVolume;
}
AbstractCanonical<double>* CanonicalPlaybackRate() {
return &mPlaybackRate;
}
AbstractCanonical<bool>* CanonicalPreservesPitch() {
return &mPreservesPitch;
}

Просмотреть файл

@ -745,7 +745,6 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
INIT_MIRROR(mPlayState, MediaDecoder::PLAY_STATE_LOADING),
INIT_MIRROR(mNextPlayState, MediaDecoder::PLAY_STATE_PAUSED),
INIT_MIRROR(mVolume, 1.0),
INIT_MIRROR(mLogicalPlaybackRate, 1.0),
INIT_MIRROR(mPreservesPitch, true),
INIT_MIRROR(mSameOriginMedia, false),
INIT_MIRROR(mMediaPrincipalHandle, PRINCIPAL_HANDLE_NONE),
@ -807,7 +806,6 @@ MediaDecoderStateMachine::InitializationTask(MediaDecoder* aDecoder)
mPlayState.Connect(aDecoder->CanonicalPlayState());
mNextPlayState.Connect(aDecoder->CanonicalNextPlayState());
mVolume.Connect(aDecoder->CanonicalVolume());
mLogicalPlaybackRate.Connect(aDecoder->CanonicalPlaybackRate());
mPreservesPitch.Connect(aDecoder->CanonicalPreservesPitch());
mSameOriginMedia.Connect(aDecoder->CanonicalSameOriginMedia());
mMediaPrincipalHandle.Connect(aDecoder->CanonicalMediaPrincipalHandle());
@ -1708,7 +1706,6 @@ MediaDecoderStateMachine::Shutdown()
mPlayState.DisconnectIfConnected();
mNextPlayState.DisconnectIfConnected();
mVolume.DisconnectIfConnected();
mLogicalPlaybackRate.DisconnectIfConnected();
mPreservesPitch.DisconnectIfConnected();
mSameOriginMedia.DisconnectIfConnected();
mMediaPrincipalHandle.DisconnectIfConnected();

Просмотреть файл

@ -894,11 +894,6 @@ private:
// Volume of playback. 0.0 = muted. 1.0 = full volume.
Mirror<double> mVolume;
// TODO: The separation between mPlaybackRate and mLogicalPlaybackRate is a
// kludge to preserve existing fragile logic while converting this setup to
// state-mirroring. Some hero should clean this up.
Mirror<double> mLogicalPlaybackRate;
// Pitch preservation for the playback rate.
Mirror<bool> mPreservesPitch;