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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.h

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CompositorWorkerGlobalScope_h 5 #ifndef CompositorWorkerGlobalScope_h
6 #define CompositorWorkerGlobalScope_h 6 #define CompositorWorkerGlobalScope_h
7 7
8 #include "core/dom/CompositorProxyClient.h"
8 #include "core/dom/FrameRequestCallbackCollection.h" 9 #include "core/dom/FrameRequestCallbackCollection.h"
9 #include "core/dom/MessagePort.h" 10 #include "core/dom/MessagePort.h"
10 #include "core/workers/WorkerGlobalScope.h" 11 #include "core/workers/WorkerGlobalScope.h"
12 #include "modules/ModulesExport.h"
13 #include "wtf/HashSet.h"
11 14
12 namespace blink { 15 namespace blink {
13 16
14 class CompositorWorkerThread; 17 class CompositorWorkerThread;
15 class WorkerThreadStartupData; 18 class WorkerThreadStartupData;
16 19
17 class CompositorWorkerGlobalScope final : public WorkerGlobalScope { 20 class MODULES_EXPORT CompositorWorkerGlobalScope final : public WorkerGlobalScop e {
18 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
19 public: 22 public:
20 static PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> create(Compositor WorkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin); 23 static PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> create(Compositor WorkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin);
21 ~CompositorWorkerGlobalScope() override; 24 ~CompositorWorkerGlobalScope() override;
22 25
23 // EventTarget 26 // EventTarget
24 const AtomicString& interfaceName() const override; 27 const AtomicString& interfaceName() const override;
25 28
26 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionState&); 29 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionState&);
27 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 30 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
28 31
29 int requestAnimationFrame(FrameRequestCallback*); 32 int requestAnimationFrame(FrameRequestCallback*);
30 void cancelAnimationFrame(int id); 33 void cancelAnimationFrame(int id);
31 void executeAnimationFrameCallbacks(double highResTimeNow); 34 bool executeAnimationFrameCallbacks(double highResTimeNow);
32 35
33 // ExecutionContext: 36 // ExecutionContext:
34 bool isCompositorWorkerGlobalScope() const override { return true; } 37 bool isCompositorWorkerGlobalScope() const override { return true; }
35 38
36 DECLARE_VIRTUAL_TRACE(); 39 DECLARE_VIRTUAL_TRACE();
37 40
38 private: 41 private:
39 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor WorkerThread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, Pas sOwnPtrWillBeRawPtr<WorkerClients>); 42 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor WorkerThread*, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData>, Pas sOwnPtrWillBeRawPtr<WorkerClients>);
40 CompositorWorkerThread* thread() const; 43 CompositorWorkerThread* thread() const;
41 44
45 bool m_executingAnimationFrameCallbacks;
42 FrameRequestCallbackCollection m_callbackCollection; 46 FrameRequestCallbackCollection m_callbackCollection;
47 CompositorProxyClient* m_client;
43 }; 48 };
44 49
45 } // namespace blink 50 } // namespace blink
46 51
47 #endif // CompositorWorkerGlobalScope_h 52 #endif // CompositorWorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698