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

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

Issue 438293003: Enable Oilpan by default for webaudio/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/AudioListener.idl ('k') | Source/modules/webaudio/AudioNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioNode.h
diff --git a/Source/modules/webaudio/AudioNode.h b/Source/modules/webaudio/AudioNode.h
index 8bf98958866bcfb454808e36db0afaa9a729f0a6..89f1e370c6b31cd210a53d41c8308ce6f212363b 100644
--- a/Source/modules/webaudio/AudioNode.h
+++ b/Source/modules/webaudio/AudioNode.h
@@ -49,8 +49,8 @@ class ExceptionState;
// An AudioDestinationNode has one input and no outputs and represents the final destination to the audio hardware.
// Most processing nodes such as filters will have one input and one output, although multiple inputs and outputs are possible.
-// AudioNode has its own ref-counting mechanism that use RefTypes so we cannot use RefCountedGarbageCollected.
-class AudioNode : public NoBaseWillBeGarbageCollectedFinalized<AudioNode>, public EventTargetWithInlineData {
+class AudioNode : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<AudioNode>, public EventTargetWithInlineData {
+ DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<AudioNode>);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioNode);
public:
enum { ProcessingSizeInFrames = 128 };
@@ -97,12 +97,6 @@ public:
String nodeTypeName() const;
void setNodeType(NodeType);
-#if !ENABLE(OILPAN)
- // Can be called from main thread or context's audio thread.
- void ref();
- void deref();
-#endif
-
// This object has been connected to another object. This might have
// existing connections from others.
// This function must be called after acquiring a connection reference.
@@ -113,9 +107,6 @@ public:
void breakConnection();
// Can be called from main thread or context's audio thread. It must be called while the context's graph lock is held.
-#if !ENABLE(OILPAN)
- void finishDeref();
-#endif
void breakConnectionWithLock();
// The AudioNodeInput(s) (if any) will already have their input data available when process() is called.
@@ -198,7 +189,7 @@ public:
protected:
// Inputs and outputs must be created before the AudioNode is initialized.
void addInput();
- void addOutput(PassOwnPtrWillBeRawPtr<AudioNodeOutput>);
+ void addOutput(AudioNodeOutput*);
// Called by processIfNecessary() to cause all parts of the rendering graph connected to us to process.
// Each rendering quantum, the audio data for each of the AudioNode's inputs will be available after this method is called.
@@ -211,18 +202,14 @@ protected:
private:
volatile bool m_isInitialized;
NodeType m_nodeType;
- RefPtrWillBeMember<AudioContext> m_context;
+ Member<AudioContext> m_context;
float m_sampleRate;
- WillBeHeapVector<OwnPtrWillBeMember<AudioNodeInput> > m_inputs;
- WillBeHeapVector<OwnPtrWillBeMember<AudioNodeOutput> > m_outputs;
+ HeapVector<Member<AudioNodeInput> > m_inputs;
+ HeapVector<Member<AudioNodeOutput> > m_outputs;
double m_lastProcessingTime;
double m_lastNonSilentTime;
-#if !ENABLE(OILPAN)
- // Ref-counting
- volatile int m_normalRefCount;
-#endif
volatile int m_connectionRefCount;
bool m_isDisabled;
@@ -234,11 +221,6 @@ private:
#endif
static unsigned s_instanceCount;
-#if !ENABLE(OILPAN)
- virtual void refEventTarget() OVERRIDE FINAL { ref(); }
- virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
-#endif
-
protected:
unsigned m_channelCount;
ChannelCountMode m_channelCountMode;
« no previous file with comments | « Source/modules/webaudio/AudioListener.idl ('k') | Source/modules/webaudio/AudioNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698