Bug 1178437 - Make mRealTime const and allow it to be accessed on any thread. r=jww

This commit is contained in:
Bobby Holley 2015-06-29 12:07:42 -07:00
Родитель c1640b0839
Коммит f3eac770a7
2 изменённых файлов: 3 добавлений и 7 удалений

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

@ -1389,11 +1389,6 @@ void MediaDecoderStateMachine::VolumeChanged()
} }
} }
bool MediaDecoderStateMachine::IsRealTime() const
{
return mRealTime;
}
void MediaDecoderStateMachine::RecomputeDuration() void MediaDecoderStateMachine::RecomputeDuration()
{ {
MOZ_ASSERT(OnTaskQueue()); MOZ_ASSERT(OnTaskQueue());

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

@ -179,7 +179,8 @@ public:
void FinishShutdown(); void FinishShutdown();
bool IsRealTime() const; // Immutable after construction - may be called on any thread.
bool IsRealTime() const { return mRealTime; }
// Functions used by assertions to ensure we're calling things // Functions used by assertions to ensure we're calling things
// on the appropriate threads. // on the appropriate threads.
@ -725,7 +726,7 @@ private:
WatchManager<MediaDecoderStateMachine> mWatchManager; WatchManager<MediaDecoderStateMachine> mWatchManager;
// True is we are decoding a realtime stream, like a camera stream. // True is we are decoding a realtime stream, like a camera stream.
bool mRealTime; const bool mRealTime;
// True if we've dispatched a task to run the state machine but the task has // True if we've dispatched a task to run the state machine but the task has
// yet to run. // yet to run.