Summary: | [GPUProcess] Bump QoS to UserInteractive for real-time audio rendering thread | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | Web Audio | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, peng.liu6, philipj, sergio, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
URL: | https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/PrioritizeWorkAtTheTaskLevel.html#//apple_ref/doc/uid/TP40013929-CH35-SW1 | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 219818 | ||||||||
Attachments: |
|
Description
Chris Dumez
2020-12-14 14:12:57 PST
Created attachment 416194 [details]
Patch
Created attachment 416196 [details]
Patch
Comment on attachment 416196 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416196&action=review > Source/WTF/ChangeLog:8 > + Add QOS parameter to the Thread construct (similarly to WorkQueue) so that the caller can Maybe priority is a better name for the parameter? (In reply to Peng Liu from comment #3) > Comment on attachment 416196 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416196&action=review > > > Source/WTF/ChangeLog:8 > > + Add QOS parameter to the Thread construct (similarly to WorkQueue) so that the caller can > > Maybe priority is a better name for the parameter? QoS (quality of service) is the naming on our platforms. The concept of process/thread priority also exists on our platforms but has a different meaning. As a result, I wouldn't want to conflate the 2. Also note that I am merely following the pattern in WorkQueue, not introducing a new concept in this patch. Comment on attachment 416196 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416196&action=review > Source/WebCore/Modules/webaudio/AudioWorkletThread.cpp:69 > + }, ThreadType::Audio, m_parameters.isAudioContextRealTime ? Thread::QOS::UserInteractive : Thread::QOS::Default); What's the non-realtime case for audio? > Source/WebCore/worklets/WorkletParameters.h:40 > + bool isAudioContextRealTime; Where does this get initialized? (In reply to Geoffrey Garen from comment #5) > Comment on attachment 416196 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416196&action=review > > > Source/WebCore/Modules/webaudio/AudioWorkletThread.cpp:69 > > + }, ThreadType::Audio, m_parameters.isAudioContextRealTime ? Thread::QOS::UserInteractive : Thread::QOS::Default); > > What's the non-realtime case for audio? When you construct an OfflineAudioContext (instead of an AudioContext), audio is rendered offline into a buffer instead of in real time on the speakers. > > > Source/WebCore/worklets/WorkletParameters.h:40 > > + bool isAudioContextRealTime; > > Where does this get initialized? Yes, it is, based on whether or not the AudioContext is offline or not, which answers your question above. Comment on attachment 416196 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416196&action=review > Source/WebCore/Modules/webaudio/AudioWorkletMessagingProxy.cpp:57 > + worklet.audioContext() ? !worklet.audioContext()->isOfflineContext() : false For Geoff, this is where the isAudioContextRealTime flag gets initialized. 👍🏻 Committed r270806: <https://trac.webkit.org/changeset/270806> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416196 [details]. |