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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add big fat TODOs in scheduler code to implement proper idle task scheduling and ensure GC is runniā€¦ 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
Index: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
index 78f1ed6beb27b0a324c26fab5deda377eb353b22..349a8055f594ff127f46a44f6182fd3f9ef36760 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
@@ -33,6 +33,7 @@ public:
}
WorkerBackingThread* thread() { return m_thread.get(); }
+ void clear() { m_thread = nullptr; }
void resetForTest()
{
ASSERT(!m_thread || (m_thread->workerScriptCount() == 0));
@@ -77,6 +78,16 @@ WorkerGlobalScope*CompositorWorkerThread::createWorkerGlobalScope(PassOwnPtr<Wor
return CompositorWorkerGlobalScope::create(this, std::move(startupData), m_timeOrigin);
}
+void CompositorWorkerThread::ensureSharedBackingThread()
+{
+ BackingThreadHolder::instance();
+}
+
+void CompositorWorkerThread::clearSharedBackingThread()
+{
+ BackingThreadHolder::instance().clear();
+}
+
void CompositorWorkerThread::resetSharedBackingThreadForTest()
{
BackingThreadHolder::instance().resetForTest();

Powered by Google App Engine
This is Rietveld 408576698