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

Side by Side Diff: Source/modules/webaudio/AudioNode.h

Issue 386403002: WebAudio: Split AudioNode::finishDeref into two parts. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // existing connections from others. 101 // existing connections from others.
102 // This function must be called after acquiring a connection reference. 102 // This function must be called after acquiring a connection reference.
103 void makeConnection(); 103 void makeConnection();
104 // This object will be disconnected from another object. This might have 104 // This object will be disconnected from another object. This might have
105 // remaining connections from others. 105 // remaining connections from others.
106 // This function must be called before releasing a connection reference. 106 // This function must be called before releasing a connection reference.
107 void breakConnection(); 107 void breakConnection();
108 108
109 // Can be called from main thread or context's audio thread. It must be cal led while the context's graph lock is held. 109 // Can be called from main thread or context's audio thread. It must be cal led while the context's graph lock is held.
110 void finishDeref(); 110 void finishDeref();
111 void breakConnectionWithLock();
111 112
112 // The AudioNodeInput(s) (if any) will already have their input data availab le when process() is called. 113 // The AudioNodeInput(s) (if any) will already have their input data availab le when process() is called.
113 // Subclasses will take this input data and put the results in the AudioBus( s) of its AudioNodeOutput(s) (if any). 114 // Subclasses will take this input data and put the results in the AudioBus( s) of its AudioNodeOutput(s) (if any).
114 // Called from context's audio thread. 115 // Called from context's audio thread.
115 virtual void process(size_t framesToProcess) = 0; 116 virtual void process(size_t framesToProcess) = 0;
116 117
117 // No significant resources should be allocated until initialize() is called . 118 // No significant resources should be allocated until initialize() is called .
118 // Processing may not occur until a node is initialized. 119 // Processing may not occur until a node is initialized.
119 virtual void initialize(); 120 virtual void initialize();
120 virtual void uninitialize(); 121 virtual void uninitialize();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 GC_PLUGIN_IGNORE("http://crbug.com/353083") 223 GC_PLUGIN_IGNORE("http://crbug.com/353083")
223 OwnPtr<Persistent<AudioNode> > m_keepAlive; 224 OwnPtr<Persistent<AudioNode> > m_keepAlive;
224 #endif 225 #endif
225 226
226 double m_lastProcessingTime; 227 double m_lastProcessingTime;
227 double m_lastNonSilentTime; 228 double m_lastNonSilentTime;
228 229
229 // Ref-counting 230 // Ref-counting
230 volatile int m_normalRefCount; 231 volatile int m_normalRefCount;
231 volatile int m_connectionRefCount; 232 volatile int m_connectionRefCount;
232 bool m_wasDisconnected;
233 233
234 bool m_isMarkedForDeletion; 234 bool m_isMarkedForDeletion;
235 bool m_isDisabled; 235 bool m_isDisabled;
236 236
237 #if DEBUG_AUDIONODE_REFERENCES 237 #if DEBUG_AUDIONODE_REFERENCES
238 static bool s_isNodeCountInitialized; 238 static bool s_isNodeCountInitialized;
239 static int s_nodeCount[NodeTypeEnd]; 239 static int s_nodeCount[NodeTypeEnd];
240 #endif 240 #endif
241 241
242 #if !ENABLE(OILPAN) 242 #if !ENABLE(OILPAN)
243 virtual void refEventTarget() OVERRIDE FINAL { ref(); } 243 virtual void refEventTarget() OVERRIDE FINAL { ref(); }
244 virtual void derefEventTarget() OVERRIDE FINAL { deref(); } 244 virtual void derefEventTarget() OVERRIDE FINAL { deref(); }
245 #endif 245 #endif
246 246
247 protected: 247 protected:
248 unsigned m_channelCount; 248 unsigned m_channelCount;
249 ChannelCountMode m_channelCountMode; 249 ChannelCountMode m_channelCountMode;
250 AudioBus::ChannelInterpretation m_channelInterpretation; 250 AudioBus::ChannelInterpretation m_channelInterpretation;
251 }; 251 };
252 252
253 } // namespace WebCore 253 } // namespace WebCore
254 254
255 #endif // AudioNode_h 255 #endif // AudioNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698