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

Unified Diff: Source/modules/webaudio/AudioContext.h

Issue 349213007: WebAudio: Remove AudioNode::RefType. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix webaudio/delaynode-max-nondefault-delay.html Created 6 years, 5 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/AudioBufferSourceNode.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioContext.h
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h
index 2abfa5ca12d0bd9e7073551be932621dc9527fab..ed31ce8b9910eae3fa5643d43b5e2232fed3b51d 100644
--- a/Source/modules/webaudio/AudioContext.h
+++ b/Source/modules/webaudio/AudioContext.h
@@ -267,10 +267,12 @@ private:
// Only accessed in the audio thread.
Vector<AudioNode*> m_finishedNodes;
- // We don't use RefPtr<AudioNode> here because AudioNode has a more complex ref() / deref() implementation
- // with an optional argument for refType. We need to use the special refType: RefTypeConnection
- // Either accessed when the graph lock is held, or on the main thread when the audio thread has finished.
- Vector<AudioNode*> m_referencedNodes;
+ // List of source nodes. This is either accessed when the graph lock is
+ // held, or on the main thread when the audio thread has finished.
+ // This RefPtr is connection reference. We must call AudioNode::
+ // makeConnection() after ref(), and call AudioNode::breakConnection()
+ // before deref().
+ Vector<RefPtr<AudioNode> > m_referencedNodes;
// Accumulate nodes which need to be deleted here.
// This is copied to m_nodesToDelete at the end of a render cycle in handlePostRenderTasks(), where we're assured of a stable graph
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698