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

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

Issue 386343004: WebAudio: Use references instead of pointers in AudioNodeInput and AudioNodeOutput. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/AudioNode.cpp ('k') | Source/modules/webaudio/AudioNodeInput.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioNodeInput.h
diff --git a/Source/modules/webaudio/AudioNodeInput.h b/Source/modules/webaudio/AudioNodeInput.h
index d53bcec7de6b38873133df74b85b0a6e21effbf5..21201c85a5e56b03704e37d6d1756c7d3cae718e 100644
--- a/Source/modules/webaudio/AudioNodeInput.h
+++ b/Source/modules/webaudio/AudioNodeInput.h
@@ -42,24 +42,24 @@ class AudioNodeOutput;
class AudioNodeInput FINAL : public AudioSummingJunction {
public:
- static PassOwnPtr<AudioNodeInput> create(AudioNode*);
+ static PassOwnPtr<AudioNodeInput> create(AudioNode&);
// AudioSummingJunction
- virtual bool canUpdateState() OVERRIDE { return !node()->isMarkedForDeletion(); }
+ virtual bool canUpdateState() OVERRIDE { return !node().isMarkedForDeletion(); }
virtual void didUpdate() OVERRIDE;
// Can be called from any thread.
- AudioNode* node() const { return m_node; }
+ AudioNode& node() const { return m_node; }
// Must be called with the context's graph lock.
- void connect(AudioNodeOutput*);
- void disconnect(AudioNodeOutput*);
+ void connect(AudioNodeOutput&);
+ void disconnect(AudioNodeOutput&);
// disable() will take the output out of the active connections list and set aside in a disabled list.
// enable() will put the output back into the active connections list.
// Must be called with the context's graph lock.
- void enable(AudioNodeOutput*);
- void disable(AudioNodeOutput*);
+ void enable(AudioNodeOutput&);
+ void disable(AudioNodeOutput&);
// pull() processes all of the AudioNodes connected to us.
// In the case of multiple connections it sums the result into an internal summing bus.
@@ -80,9 +80,9 @@ public:
unsigned numberOfChannels() const;
private:
- explicit AudioNodeInput(AudioNode*);
+ explicit AudioNodeInput(AudioNode&);
- AudioNode* m_node;
+ AudioNode& m_node;
// m_disabledOutputs contains the AudioNodeOutputs which are disabled (will not be processed) by the audio graph rendering.
// But, from JavaScript's perspective, these outputs are still connected to us.
« no previous file with comments | « Source/modules/webaudio/AudioNode.cpp ('k') | Source/modules/webaudio/AudioNodeInput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698