зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1173001 - Enable tail dispatch for the decode task queue. r=jww
This commit is contained in:
Родитель
c2bf6e7564
Коммит
1f204f9a7c
|
@ -64,7 +64,9 @@ MediaDecoderReader::MediaDecoderReader(AbstractMediaDecoder* aDecoder,
|
|||
MediaTaskQueue* aBorrowedTaskQueue)
|
||||
: mAudioCompactor(mAudioQueue)
|
||||
, mDecoder(aDecoder)
|
||||
, mTaskQueue(aBorrowedTaskQueue ? aBorrowedTaskQueue : new MediaTaskQueue(GetMediaThreadPool(MediaThreadType::PLAYBACK)))
|
||||
, mTaskQueue(aBorrowedTaskQueue ? aBorrowedTaskQueue
|
||||
: new MediaTaskQueue(GetMediaThreadPool(MediaThreadType::PLAYBACK),
|
||||
/* aSupportsTailDispatch = */ true))
|
||||
, mIgnoreAudioOutputFormat(false)
|
||||
, mStartTime(-1)
|
||||
, mHitAudioDecodeError(false)
|
||||
|
|
|
@ -182,7 +182,7 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
|||
bool aRealTime) :
|
||||
mDecoder(aDecoder),
|
||||
mTaskQueue(new MediaTaskQueue(GetMediaThreadPool(MediaThreadType::PLAYBACK),
|
||||
/* aAssertTailDispatch = */ true)),
|
||||
/* aSupportsTailDispatch = */ true)),
|
||||
mWatchManager(this, mTaskQueue),
|
||||
mRealTime(aRealTime),
|
||||
mDispatchedStateMachine(false),
|
||||
|
|
|
@ -31,7 +31,7 @@ typedef MediaPromise<bool, bool, false> ShutdownPromise;
|
|||
// to make this threadsafe for objects that aren't already threadsafe.
|
||||
class MediaTaskQueue : public AbstractThread {
|
||||
public:
|
||||
explicit MediaTaskQueue(TemporaryRef<SharedThreadPool> aPool, bool aRequireTailDispatch = false);
|
||||
explicit MediaTaskQueue(TemporaryRef<SharedThreadPool> aPool, bool aSupportsTailDispatch = false);
|
||||
|
||||
void Dispatch(TemporaryRef<nsIRunnable> aRunnable,
|
||||
DispatchFailureHandling aFailureHandling = AssertDispatchSuccess)
|
||||
|
|
Загрузка…
Ссылка в новой задаче