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

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

Issue 1037683002: Web Audio: Unapply Oilpan to AudioSummingJunction. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove m_didCallDispose Created 5 years, 9 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/AudioSummingJunction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioSummingJunction.cpp
diff --git a/Source/modules/webaudio/AudioSummingJunction.cpp b/Source/modules/webaudio/AudioSummingJunction.cpp
index 5517f9e03fbb563d6248ed52734f5297ae78203c..76af2c0291ad7e36f74a6b781cdcdfacb50e290a 100644
--- a/Source/modules/webaudio/AudioSummingJunction.cpp
+++ b/Source/modules/webaudio/AudioSummingJunction.cpp
@@ -32,48 +32,30 @@
namespace blink {
-AudioSummingJunction::AudioSummingJunction(AudioContext* context)
- : m_context(context)
+AudioSummingJunction::AudioSummingJunction(DeferredTaskHandler& handler)
+ : m_deferredTaskHandler(handler)
, m_renderingStateNeedUpdating(false)
- , m_didCallDispose(false)
{
- ASSERT(context);
- m_context->registerLiveAudioSummingJunction(*this);
-}
-
-void AudioSummingJunction::dispose()
-{
- m_didCallDispose = true;
- m_context->handler().removeMarkedSummingJunction(this);
}
AudioSummingJunction::~AudioSummingJunction()
{
-}
-
-DEFINE_TRACE(AudioSummingJunction)
-{
- visitor->trace(m_context);
- // FIXME: Oilpan: m_renderingOutputs should not be strong references. This
- // is a short-term workaround to avoid crashes, and causes AudioNode leaks.
- AudioContext::AutoLocker locker(m_context);
- for (size_t i = 0; i < m_renderingOutputs.size(); ++i)
- visitor->trace(m_renderingOutputs[i]);
+ deferredTaskHandler().removeMarkedSummingJunction(this);
}
void AudioSummingJunction::changedOutputs()
{
- ASSERT(context()->isGraphOwner());
- if (!m_renderingStateNeedUpdating && !m_didCallDispose) {
- context()->handler().markSummingJunctionDirty(this);
+ ASSERT(deferredTaskHandler().isGraphOwner());
+ if (!m_renderingStateNeedUpdating) {
+ deferredTaskHandler().markSummingJunctionDirty(this);
m_renderingStateNeedUpdating = true;
}
}
void AudioSummingJunction::updateRenderingState()
{
- ASSERT(context()->isAudioThread());
- ASSERT(context()->isGraphOwner());
+ ASSERT(deferredTaskHandler().isAudioThread());
+ ASSERT(deferredTaskHandler().isGraphOwner());
if (m_renderingStateNeedUpdating) {
// Copy from m_outputs to m_renderingOutputs.
m_renderingOutputs.resize(m_outputs.size());
« no previous file with comments | « Source/modules/webaudio/AudioSummingJunction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698