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

Unified Diff: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp

Issue 2006883002: Gracefully handle dirtying of audio nodes while processing current set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
index d294fe8fa80585e76e0331a63cb657d395b0f72c..8cbecfc07b38c89ce60357434018d0589fa663b0 100644
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
@@ -131,9 +131,14 @@ void DeferredTaskHandler::handleDirtyAudioNodeOutputs()
{
ASSERT(isGraphOwner());
- for (AudioNodeOutput* output : m_dirtyAudioNodeOutputs)
+ HashSet<AudioNodeOutput*> dirtyOutputs;
+ m_dirtyAudioNodeOutputs.swap(dirtyOutputs);
hongchan 2016/05/23 20:43:34 What if this swapping happens when the audio threa
sof 2016/05/23 21:06:30 No, the calling context will have to guarantee exc
+
+ // Note: the updating of rendering state may cause output nodes
+ // further down the chain to be marked as dirty. These will not
+ // be processed in this render quantum.
+ for (AudioNodeOutput* output : dirtyOutputs)
output->updateRenderingState();
- m_dirtyAudioNodeOutputs.clear();
}
void DeferredTaskHandler::addAutomaticPullNode(AudioHandler* node)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698