Cache PannerNode's azimuth, elevation and coneGain for better performance. I have noticed while profiling https://downloads.scirra.com/labs/bugs/safaripannerquality/ that PannerNode::process() spends most of its CPU time under PannerNode::calculateAzimuthElevation(). We shouldn't have to re-calculate those properties for every rendering quantum.
Created attachment 440393 [details] Patch
Comment on attachment 440393 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440393&action=review > Source/WebCore/Modules/webaudio/AudioListener.cpp:126 > +void AudioListener::updateDirtyState() I must be missing something, but it seems like this function says "if nothing has changed, then we are dirty", which is opposite how I usually understand the phrase "dirty" in rendering. What am I missing?
Comment on attachment 440393 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440393&action=review >> Source/WebCore/Modules/webaudio/AudioListener.cpp:126 >> +void AudioListener::updateDirtyState() > > I must be missing something, but it seems like this function says "if nothing has changed, then we are dirty", which is opposite how I usually understand the phrase "dirty" in rendering. What am I missing? Uh? I think I messed things up with a last minute patch clean up before uploading. I agree this looks backwards now.
Created attachment 440461 [details] Patch
The cache is being leveraged by imported/w3c/web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-rolloff-clamping.html
Comment on attachment 440461 [details] Patch r=me
Committed r283740 (242662@main): <https://commits.webkit.org/242662@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 440461 [details].
<rdar://problem/83996910>