Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp |
| index 0cf20480324d354b2f7beddd9f74b94e074f3051..ac9c3af7ba24c3af68e233be0fda8ac23d0eaaff 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp |
| @@ -8,6 +8,7 @@ |
| #include "bindings/core/v8/ExceptionState.h" |
| #include "core/dom/ExceptionCode.h" |
| #include "modules/webaudio/AudioBasicProcessorHandler.h" |
| +#include "platform/Histogram.h" |
| namespace blink { |
| @@ -17,6 +18,14 @@ IIRFilterNode::IIRFilterNode(AbstractAudioContext& context, float sampleRate, co |
| setHandler(AudioBasicProcessorHandler::create( |
| AudioHandler::NodeTypeIIRFilter, *this, sampleRate, |
| adoptPtr(new IIRProcessor(sampleRate, 1, feedforwardCoef, feedbackCoef)))); |
| + |
| + // Histogram of the IIRFilter order. createIIRFilter ensures that the length of |feedbackCoef| |
| + // is in the range [1, IIRFilter::kMaxOrder + 1]. The order is one less than the length of this |
| + // vector. |
| + DEFINE_STATIC_LOCAL(EnumerationHistogram, filterOrderHistogram, |
| + ("WebAudio.IIRFilterNode.Order", IIRFilter::kMaxOrder)); |
|
Ilya Sherman
2016/04/29 20:51:40
Could this be a sparse histogram instead? Or is t
Ilya Sherman
2016/04/29 20:51:40
Could you please add a compile-time assertion to v
Raymond Toy
2016/04/29 20:56:25
This is the constructor of the IIRFilterNode and i
Ilya Sherman
2016/04/29 21:01:04
Okay, so it sounds like it would be fine to use a
Raymond Toy
2016/04/29 21:09:34
Yep. Working on that now and on your other commen
Ilya Sherman
2016/04/29 21:42:10
It specifies the minimum value of the overflow buc
|
| + |
| + filterOrderHistogram.count(feedbackCoef.size() - 1); |
| } |
| DEFINE_TRACE(IIRFilterNode) |