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..d00ee260d097aee1ac56cb39821c2aec4d28155b 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(CustomCountHistogram, qHistogram, |
|
hongchan
2016/04/28 22:07:07
Why qHistogram? Does |q| have some meaning?
Raymond Toy
2016/04/28 22:09:17
Don't know. I stole this example from the blink th
jbroman
2016/04/28 22:18:09
nit: "qHistogram" was a name in my example because
Raymond Toy
2016/04/28 22:44:12
Renamed to filterOrderHistogram.
|
| + ("WebAudio.IIRFilterNode.order", 0, IIRFilter::kMaxOrder, IIRFilter::kMaxOrder + 1)); |
|
jbroman
2016/04/28 22:18:09
CustomCountHistogram is, by default, logarithmic;
Raymond Toy
2016/04/28 22:44:12
Changed to EnumerationHistogram. (It's impossible
|
| + |
| + qHistogram.count(feedbackCoef.size() - 1); |
| } |
| DEFINE_TRACE(IIRFilterNode) |