Chromium Code Reviews
DescriptionAvoid slow AudioParam automation path when possible
Currently, when any automation method is called for an AudioParam, all
future uses for the AudioParam must go through the timeline processing
code. This can be slow.
To optimize this, when running the timeline, check to see if the last
event is in the past (and is not a SetTarget event, which lasts
forever), and just quickly return the default value. Also empty the
timeline since all events are past. Then the faster non-timeline code
can be done.
A couple of nodes needed to be updated because they weren't ready to handle
switching from automation to non-automation.
biquad-automation.html modified to end automation before the end of rendering
to show that changing from automation path to fast path works.
audio-testing.js updated to handle a relative error of Infinity. This
happens because the expected value is 0 so the relative error is either
Infinity or NaN.
BUG=551484
TESTS=biquad-automation.html
Committed: https://crrev.com/3338dd16e602d195a40833200211ff55e15e1586
Cr-Commit-Position: refs/heads/master@{#402227}
Patch Set 1 #Patch Set 2 #Patch Set 3 : Simplify condition on deleting old events. #Patch Set 4 : Add comments #Patch Set 5 : Move m_smoothedValue from AudioParam to AudioParamTimeline. #
Total comments: 7
Patch Set 6 : Address review comments #Messages
Total messages: 15 (7 generated)
|