Bug 219990

Summary: [WebAudio] Simplify code related to dispatchToRenderThread
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, calvaris, cdumez, eric.carlson, ews-watchlist, ggaren, glenn, gyuyoung.kim, jer.noble, philipj, pnormand, ryuan.choi, sergio, vjaquez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 220112    
Attachments:
Description Flags
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch none

Description Chris Dumez 2020-12-17 12:18:45 PST
Simplify code related to dispatchToRenderThread in WebAudio:
1. AudioDestination::start() now always gets called with a non-null dispatchToRenderThread lambda. In the case where there is no AudioWorkletThread to dispatch to, the lambda simply calls its task synchronously.
2. For Cocoa ports, make it so that only AudioDestinationCocoa needs to worry about the dispatchToRenderThread lambda. The dispatchToRenderThread lambda is no longer exposed to subclasses such as MockAudioDestinationCocoa & RemoteAudioDestinationProxy.
Comment 1 Chris Dumez 2020-12-17 12:42:21 PST
Created attachment 416452 [details]
Patch
Comment 2 Chris Dumez 2020-12-17 13:02:47 PST
Created attachment 416458 [details]
Patch
Comment 3 Chris Dumez 2020-12-17 13:05:25 PST
Created attachment 416459 [details]
Patch
Comment 4 Chris Dumez 2020-12-17 13:11:02 PST
Created attachment 416460 [details]
Patch
Comment 5 Chris Dumez 2020-12-17 13:16:36 PST
Created attachment 416461 [details]
Patch
Comment 6 Geoffrey Garen 2020-12-17 14:02:31 PST
Comment on attachment 416461 [details]
Patch

r=me
Comment 7 EWS 2020-12-17 14:24:09 PST
Committed r270947: <https://trac.webkit.org/changeset/270947>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416461 [details].
Comment 8 Radar WebKit Bug Importer 2020-12-17 14:25:18 PST
<rdar://problem/72441076>