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

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

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
Index: Source/modules/compositorworker/CompositorWorkerThread.h
diff --git a/Source/modules/compositorworker/CompositorWorkerThread.h b/Source/modules/compositorworker/CompositorWorkerThread.h
index 7c62b3b23fd2a1545b0c9e80fecffa164875f24f..d4d0cf5eaca366a43977498de82a65b113836d86 100644
--- a/Source/modules/compositorworker/CompositorWorkerThread.h
+++ b/Source/modules/compositorworker/CompositorWorkerThread.h
@@ -6,28 +6,38 @@
#define CompositorWorkerThread_h
#include "core/workers/WorkerThread.h"
+#include "modules/ModulesExport.h"
namespace blink {
class WorkerObjectProxy;
-class CompositorWorkerThread final : public WorkerThread {
+// This class is overridden in unit-tests.
+class MODULES_EXPORT CompositorWorkerThread : public WorkerThread {
public:
static PassRefPtr<CompositorWorkerThread> create(PassRefPtr<WorkerLoaderProxy>, WorkerObjectProxy&, double timeOrigin);
virtual ~CompositorWorkerThread();
WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; }
-private:
+protected:
CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerObjectProxy&, double timeOrigin);
// WorkerThread:
PassRefPtrWillBeRawPtr<WorkerGlobalScope> createWorkerGlobalScope(PassOwnPtr<WorkerThreadStartupData>) override;
WebThreadSupportingGC& backingThread() override;
+ void didStartRunLoop() override { }
+ void didStopRunLoop() override { }
+ void initializeBackingThread() override;
+ void shutdownBackingThread() override;
+ v8::Isolate* initializeIsolate() override;
+ void willDestroyIsolate() override;
+ void destroyIsolate() override;
+ void terminateV8Execution() override;
+private:
WorkerObjectProxy& m_workerObjectProxy;
double m_timeOrigin;
- OwnPtr<WebThreadSupportingGC> m_thread;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698