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

Unified Diff: Source/modules/compositorworker/CompositorWorkerThread.cpp

Issue 1158443008: compositor-worker: Share a thread and an isolate for compositor workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tot-merge Created 5 years, 6 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/compositorworker/CompositorWorkerThread.h ('k') | Source/modules/compositorworker/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/compositorworker/CompositorWorkerThread.cpp
diff --git a/Source/modules/compositorworker/CompositorWorkerThread.cpp b/Source/modules/compositorworker/CompositorWorkerThread.cpp
index b540dd5befbdaaef56f553d9d110a4dcbc5435b0..fa420027933081e3485cf6dce85ce7dc3144510f 100644
--- a/Source/modules/compositorworker/CompositorWorkerThread.cpp
+++ b/Source/modules/compositorworker/CompositorWorkerThread.cpp
@@ -9,6 +9,7 @@
#include "core/workers/WorkerObjectProxy.h"
#include "core/workers/WorkerThreadStartupData.h"
#include "modules/compositorworker/CompositorWorkerGlobalScope.h"
+#include "modules/compositorworker/CompositorWorkerManager.h"
#include "public/platform/Platform.h"
namespace blink {
@@ -37,9 +38,37 @@ PassRefPtrWillBeRawPtr<WorkerGlobalScope> CompositorWorkerThread::createWorkerGl
WebThreadSupportingGC& CompositorWorkerThread::backingThread()
{
- if (!m_thread)
- m_thread = WebThreadSupportingGC::create("CompositorWorker Thread");
- return *m_thread.get();
+ return CompositorWorkerManager::instance()->compositorWorkerThread();
+}
+
+void CompositorWorkerThread::initializeBackingThread()
+{
+ CompositorWorkerManager::instance()->initializeBackingThread();
+}
+
+void CompositorWorkerThread::shutdownBackingThread()
+{
+ CompositorWorkerManager::instance()->shutdownBackingThread();
+}
+
+v8::Isolate* CompositorWorkerThread::initializeIsolate()
+{
+ return CompositorWorkerManager::instance()->initializeIsolate();
+}
+
+void CompositorWorkerThread::willDestroyIsolate()
+{
+ CompositorWorkerManager::instance()->willDestroyIsolate();
+}
+
+void CompositorWorkerThread::destroyIsolate()
+{
+ CompositorWorkerManager::instance()->destroyIsolate();
+}
+
+void CompositorWorkerThread::terminateV8Execution()
+{
+ CompositorWorkerManager::instance()->terminateV8Execution();
}
} // namespace blink
« no previous file with comments | « Source/modules/compositorworker/CompositorWorkerThread.h ('k') | Source/modules/compositorworker/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698