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

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

Issue 1405413004: Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 393494ccdd760e81d9e8f4b3055fbb1ecb402934..c6e57ad6b0d8cf56b2c75b5881467343009225fd 100644
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
@@ -60,6 +60,13 @@ void DeferredTaskHandler::unlock()
m_contextGraphMutex.unlock();
}
+void DeferredTaskHandler::offlineLock()
+{
+ // It is safe to lock the audio thread for offline rendering.
+ ASSERT(isAudioThread());
Raymond Toy 2015/10/16 23:32:36 What should we do in a release build if we acciden
hongchan 2015/10/19 20:08:12 This is why I completely separated the render meth
Raymond Toy 2015/10/19 20:27:27 Maybe RELEASE_ASSERT or RELEASE_ASSERT_WITH_MESSAG
hongchan 2015/10/20 22:03:06 Done.
+ m_contextGraphMutex.lock();
+}
+
#if ENABLE(ASSERT)
bool DeferredTaskHandler::isGraphOwner()
{

Powered by Google App Engine
This is Rietveld 408576698