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

Unified Diff: third_party/WebKit/Source/modules/worklet/CompositorWorkletThread.h

Issue 1510603005: [Do not submit] Worklet implementation. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A basic CompositorWorklet implementation. Created 5 years 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/worklet/CompositorWorkletThread.h
diff --git a/third_party/WebKit/Source/modules/worklet/CompositorWorkletThread.h b/third_party/WebKit/Source/modules/worklet/CompositorWorkletThread.h
new file mode 100644
index 0000000000000000000000000000000000000000..0d3403d4b3c0d4d2fdf7a2a30b1f016a331af874
--- /dev/null
+++ b/third_party/WebKit/Source/modules/worklet/CompositorWorkletThread.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CompositorWorkletThread_h
+#define CompositorWorkletThread_h
+
+#include "platform/WebThreadSupportingGC.h"
+#include "platform/heap/Handle.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class WorkletGlobalScope;
+
+class CompositorWorkletThread : public RefCounted<CompositorWorkletThread> {
+public:
+ static PassRefPtr<CompositorWorkletThread> create();
+ virtual ~CompositorWorkletThread();
+
+ void initialize();
+ void loadScript(const String& sourceCode);
+
+ v8::Isolate* isolate() const { return m_isolate; }
+
+private:
+ CompositorWorkletThread();
+
+ WebThreadSupportingGC& backingThread();
+ void initializeInternal();
+ void loadScriptInternal(const String& sourceCode);
+
+ OwnPtr<WebThread::TaskObserver> m_microtaskRunner;
+
+ bool m_initialized = false;
+ Mutex m_threadStateMutex;
+
+ RefPtrWillBePersistent<WorkletGlobalScope> m_workletGlobalScope;
+ v8::Isolate* m_isolate;
+};
+
+} // namespace blink
+
+#endif // CompositorWorkletThread_h
« no previous file with comments | « third_party/WebKit/Source/modules/modules.gypi ('k') | third_party/WebKit/Source/modules/worklet/CompositorWorkletThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698