Run offline MSG thread even when not rendering

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P2
normal
RESOLVED FIXED
8 months ago
7 months ago

People

(Reporter: karlt, Assigned: karlt)

Tracking

Trunk
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(18 attachments)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
This is necessary to process events for AudioWorklet (which may run JS) on the same thread as JS is running during rendering.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=54eeba1e2378c32553c9e187f5c0e0852c4b7f35
MozReview-Commit-ID: 1QKFopM8qIV

Depends on D10159
MozReview-Commit-ID: CHudtPp66BC

Depends on D10160
mWaitState is only ever tested against WAITSTATE_WAITING_INDEFINITELY and so
the other values are equivalent.  It is never WAITSTATE_WAITING_INDEFINITELY
on leaving (or entering) WaitForNextIteration and so there is no need to set
it in WakeUp().

Depends on D10161
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
This will prevent rendering from starting when the graph thread is started
before StartNonRealtimeProcessing() is called.

Depends on D10167
With this change, the graph is already running when mEndTime is set and so
this must be done on the graph thread for consistent ordering with in-flight
messages.

Depends on D10168
decodeAudioData() is a common OfflineAudioContext use case where the graph
is not required.

Depends on D10174

Comment 19

8 months ago
Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/981f31de3924
remove unused MediaStream::ConsumerCount() r=padenot
https://hg.mozilla.org/integration/autoland/rev/3fb0c8f6d6e2
remove unused MediaStreamGraphImpl::Running() r=padenot
https://hg.mozilla.org/integration/autoland/rev/3eca90e1af07
remove unnecessary monitor notify for AudioCallbackDriver r=padenot
https://hg.mozilla.org/integration/autoland/rev/7889d20e3a29
remove unnecessary SystemClockDriver::mWaitState r=padenot
https://hg.mozilla.org/integration/autoland/rev/543cac7034fe
add wait/wake-up support to OfflineAudioContext r=padenot
https://hg.mozilla.org/integration/autoland/rev/de7f45d6f032
update offline main thread state when there is no pending iteration r=padenot
https://hg.mozilla.org/integration/autoland/rev/7e9935a07eaf
when graph time has not advanced, only ensure another iteration if rendering r=padenot
https://hg.mozilla.org/integration/autoland/rev/61d08765489c
do not shut down graph thread on completion of offline rendering r=padenot
https://hg.mozilla.org/integration/autoland/rev/d9eda2382bd9
remove unused ProcessedMediaStream::QueueFinish() r=padenot

Comment 20

8 months ago
Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ba172f2b086a
initialize mEndTime to zero for offline graphs r=padenot
https://hg.mozilla.org/integration/autoland/rev/2c97e4069615
create offline graph thread on receipt of the first message r=padenot
https://hg.mozilla.org/integration/autoland/rev/a1573c156ba1
make RoundUpToEndOfAudioBlock() a static member r=padenot
https://hg.mozilla.org/integration/autoland/rev/ec0336b4a1bf
remove special-case sync dispatch for not-started offline RunAfterPendingUpdates() r=padenot
https://hg.mozilla.org/integration/autoland/rev/90a9506812f6
remove mNonRealtimeProcessing r=padenot
https://hg.mozilla.org/integration/autoland/rev/5744145e9c7e
remove unused HasAudioOutput() r=padenot
https://hg.mozilla.org/integration/autoland/rev/89480ab36714
don't add audio output to offline streams r=padenot
https://hg.mozilla.org/integration/autoland/rev/821b04c10c0d
delay creation of offline graph and stream that may not be required r=padenot
https://hg.mozilla.org/integration/autoland/rev/9c23717ddc50
remove unused function finish() r=padenot
Blocks: 1513722
You need to log in before you can comment on or make changes to this bug.