Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1214)

Unified Diff: Source/modules/webaudio/ScriptProcessorNode.cpp

Issue 205173002: Move webaudio to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webaudio/ScriptProcessorNode.h ('k') | Source/modules/webaudio/WaveShaperNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/ScriptProcessorNode.cpp
diff --git a/Source/modules/webaudio/ScriptProcessorNode.cpp b/Source/modules/webaudio/ScriptProcessorNode.cpp
index f57e72e52cbf3563665b016f6723fdca1e23d459..dbbcfdd595ff2cf5531ea001e28576afd3920f62 100644
--- a/Source/modules/webaudio/ScriptProcessorNode.cpp
+++ b/Source/modules/webaudio/ScriptProcessorNode.cpp
@@ -56,7 +56,7 @@ static size_t chooseBufferSize()
return bufferSize;
}
-PassRefPtr<ScriptProcessorNode> ScriptProcessorNode::create(AudioContext* context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
+PassRefPtrWillBeRawPtr<ScriptProcessorNode> ScriptProcessorNode::create(AudioContext* context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
{
// Check for valid buffer size.
switch (bufferSize) {
@@ -84,7 +84,7 @@ PassRefPtr<ScriptProcessorNode> ScriptProcessorNode::create(AudioContext* contex
if (numberOfOutputChannels > AudioContext::maxNumberOfChannels())
return nullptr;
- return adoptRef(new ScriptProcessorNode(context, sampleRate, bufferSize, numberOfInputChannels, numberOfOutputChannels));
+ return adoptRefWillBeNoop(new ScriptProcessorNode(context, sampleRate, bufferSize, numberOfInputChannels, numberOfOutputChannels));
}
ScriptProcessorNode::ScriptProcessorNode(AudioContext* context, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
@@ -127,8 +127,8 @@ void ScriptProcessorNode::initialize()
// Create double buffers on both the input and output sides.
// These AudioBuffers will be directly accessed in the main thread by JavaScript.
for (unsigned i = 0; i < 2; ++i) {
- RefPtr<AudioBuffer> inputBuffer = m_numberOfInputChannels ? AudioBuffer::create(m_numberOfInputChannels, bufferSize(), sampleRate) : nullptr;
- RefPtr<AudioBuffer> outputBuffer = m_numberOfOutputChannels ? AudioBuffer::create(m_numberOfOutputChannels, bufferSize(), sampleRate) : nullptr;
+ RefPtrWillBeRawPtr<AudioBuffer> inputBuffer = m_numberOfInputChannels ? AudioBuffer::create(m_numberOfInputChannels, bufferSize(), sampleRate) : nullptr;
+ RefPtrWillBeRawPtr<AudioBuffer> outputBuffer = m_numberOfOutputChannels ? AudioBuffer::create(m_numberOfOutputChannels, bufferSize(), sampleRate) : nullptr;
m_inputBuffers.append(inputBuffer);
m_outputBuffers.append(outputBuffer);
@@ -284,6 +284,13 @@ double ScriptProcessorNode::latencyTime() const
return std::numeric_limits<double>::infinity();
}
+void ScriptProcessorNode::trace(Visitor* visitor)
+{
+ visitor->trace(m_inputBuffers);
+ visitor->trace(m_outputBuffers);
+ AudioNode::trace(visitor);
+}
+
} // namespace WebCore
#endif // ENABLE(WEB_AUDIO)
« no previous file with comments | « Source/modules/webaudio/ScriptProcessorNode.h ('k') | Source/modules/webaudio/WaveShaperNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698