Bug 1499903 - part3 : change 'mLogicallySeeking' to Watchable r=chunmin

Nobody is mirroring to 'mLogicallySeeking', so we can just use Watchable instead.

Differential Revision: https://phabricator.services.mozilla.com/D9642

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2018-11-06 22:00:11 +00:00
parent 2d693090af
commit 20219eb9f9
2 changed files with 4 additions and 8 deletions

View File

@ -275,6 +275,7 @@ MediaDecoder::MediaDecoder(MediaDecoderInit& aInit)
, mForcedHidden(false)
, mHasSuspendTaint(aInit.mHasSuspendTaint)
, mPlaybackRate(aInit.mPlaybackRate)
, mLogicallySeeking(false, "MediaDecoder::mLogicallySeeking")
, INIT_MIRROR(mBuffered, TimeIntervals())
, INIT_MIRROR(mCurrentPosition, TimeUnit::Zero())
, INIT_MIRROR(mStateMachineDuration, NullableTimeUnit())
@ -283,7 +284,6 @@ MediaDecoder::MediaDecoder(MediaDecoderInit& aInit)
, INIT_CANONICAL(mPreservesPitch, aInit.mPreservesPitch)
, INIT_CANONICAL(mLooping, aInit.mLooping)
, INIT_CANONICAL(mPlayState, PLAY_STATE_LOADING)
, INIT_CANONICAL(mLogicallySeeking, false)
, INIT_CANONICAL(mSameOriginMedia, false)
, INIT_CANONICAL(mMediaPrincipalHandle, PRINCIPAL_HANDLE_NONE)
, mVideoDecodingOberver(new BackgroundVideoDecodingPermissionObserver(this))

View File

@ -602,6 +602,9 @@ protected:
// PlaybackRate and pitch preservation status we should start at.
double mPlaybackRate;
// True if the decoder is seeking.
Watchable<bool> mLogicallySeeking;
// Buffered range, mirrored from the reader.
Mirror<media::TimeIntervals> mBuffered;
@ -634,9 +637,6 @@ protected:
// This can only be changed on the main thread.
PlayState mNextState = PLAY_STATE_PAUSED;
// True if the decoder is seeking.
Canonical<bool> mLogicallySeeking;
// True if the media is same-origin with the element. Data can only be
// passed to MediaStreams when this is true.
Canonical<bool> mSameOriginMedia;
@ -665,10 +665,6 @@ public:
return &mLooping;
}
AbstractCanonical<PlayState>* CanonicalPlayState() { return &mPlayState; }
AbstractCanonical<bool>* CanonicalLogicallySeeking()
{
return &mLogicallySeeking;
}
AbstractCanonical<bool>* CanonicalSameOriginMedia()
{
return &mSameOriginMedia;