зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1503132 do not shut down graph thread on completion of offline rendering r=padenot
AudioWorket will need to keep processing events on the graph thread. The graph thread is instead shut down when the AudioContext is destroyed. Depends on D10165 Differential Revision: https://phabricator.services.mozilla.com/D10166 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8de2b7d0e5
Коммит
583e8af90c
|
@ -1230,18 +1230,6 @@ MediaStreamGraphImpl::ProduceDataForStreamsBlockByBlock(uint32_t aStreamIndex,
|
||||||
"Something went wrong with rounding to block boundaries");
|
"Something went wrong with rounding to block boundaries");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
MediaStreamGraphImpl::AllFinishedStreamsNotified()
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(OnGraphThread());
|
|
||||||
for (MediaStream* stream : AllStreams()) {
|
|
||||||
if (stream->mFinished && !stream->mNotifiedFinished) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MediaStreamGraphImpl::RunMessageAfterProcessing(UniquePtr<ControlMessage> aMessage)
|
MediaStreamGraphImpl::RunMessageAfterProcessing(UniquePtr<ControlMessage> aMessage)
|
||||||
{
|
{
|
||||||
|
@ -1451,7 +1439,6 @@ MediaStreamGraphImpl::UpdateMainThreadState()
|
||||||
MOZ_ASSERT(OnGraphThread());
|
MOZ_ASSERT(OnGraphThread());
|
||||||
MonitorAutoLock lock(mMonitor);
|
MonitorAutoLock lock(mMonitor);
|
||||||
bool finalUpdate = mForceShutDown ||
|
bool finalUpdate = mForceShutDown ||
|
||||||
(mProcessedTime >= mEndTime && AllFinishedStreamsNotified()) ||
|
|
||||||
(IsEmpty() && mBackMessageQueue.IsEmpty());
|
(IsEmpty() && mBackMessageQueue.IsEmpty());
|
||||||
PrepareUpdatesToMainThreadState(finalUpdate);
|
PrepareUpdatesToMainThreadState(finalUpdate);
|
||||||
if (finalUpdate) {
|
if (finalUpdate) {
|
||||||
|
|
|
@ -218,11 +218,6 @@ public:
|
||||||
* mMonitor must be held.
|
* mMonitor must be held.
|
||||||
*/
|
*/
|
||||||
void PrepareUpdatesToMainThreadState(bool aFinalUpdate);
|
void PrepareUpdatesToMainThreadState(bool aFinalUpdate);
|
||||||
/**
|
|
||||||
* Returns false if there is any stream that has finished but not yet finished
|
|
||||||
* playing out.
|
|
||||||
*/
|
|
||||||
bool AllFinishedStreamsNotified();
|
|
||||||
/**
|
/**
|
||||||
* If we are rendering in non-realtime mode, we don't want to send messages to
|
* If we are rendering in non-realtime mode, we don't want to send messages to
|
||||||
* the main thread at each iteration for performance reasons. We instead
|
* the main thread at each iteration for performance reasons. We instead
|
||||||
|
|
Загрузка…
Ссылка в новой задаче