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

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

Issue 1026843003: compositor-worker: Create a separate CompositorWorkerGlobalScope for compositor workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "core/workers/DedicatedWorkerGlobalScope.h"
6
7 #ifndef CompositorWorkerGlobalScope_h
8 #define CompositorWorkerGlobalScope_h
9
10 namespace blink {
11
12 class CompositorWorkerThread;
13 class RequestAnimationFrameCallback;
14
15 class CompositorWorkerGlobalScope final : public DedicatedWorkerGlobalScope {
16 DEFINE_WRAPPERTYPEINFO();
17 public:
18 static PassRefPtrWillBeRawPtr<CompositorWorkerGlobalScope> create(Compositor WorkerThread*, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData>, double timeOrigi n);
19 virtual ~CompositorWorkerGlobalScope();
20
21 // EventTarget
22 const AtomicString& interfaceName() const override;
23
24 int requestCompositorFrame(RequestAnimationFrameCallback*);
25 void cancelCompositorFrame(int id);
26
27 void executeCompositorFrameCallbacks(double monotonicTimeNow);
28
29 DECLARE_VIRTUAL_TRACE();
30
31 protected:
32 CompositorWorkerGlobalScope(const KURL&, const String& userAgent, Compositor WorkerThread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr< WorkerClients>);
33
34 private:
35 typedef PersistentHeapVectorWillBeHeapVector<Member<RequestAnimationFrameCal lback>> CallbackList;
36 CallbackList m_callbacks;
37 CallbackList m_callbacksToInvoke; // only non-empty while inside executeCall backs
38
39 int m_nextCallbackId;
40 };
41
42 } // namespace blink
43
44 #endif // CompositorWorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/modules/EventTargetModulesFactory.in ('k') | Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698