OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 #ifndef CompositorMutatorImpl_h | |
6 #define CompositorMutatorImpl_h | |
7 | |
8 #include "platform/graphics/CompositorMutator.h" | |
9 #include "platform/heap/Handle.h" | |
10 #include "platform/heap/HeapAllocator.h" | |
11 #include "wtf/Noncopyable.h" | |
12 #include "wtf/OwnPtr.h" | |
13 #include "wtf/PassOwnPtr.h" | |
14 | |
15 namespace blink { | |
16 | |
17 class CompositorProxy; | |
18 class CompositorProxyClientImpl; | |
19 class CompositorWorkerGlobalScope; | |
20 class CompositorMutatorClient; | |
21 class CustomCompositorAnimationManager; | |
22 class WaitableEvent; | |
23 | |
24 class CompositorMutatorImpl final : public CompositorMutator { | |
jbroman
2016/04/29 19:42:22
Class comment, please. Maybe something along the l
flackr
2016/05/03 22:24:54
Done.
| |
25 WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl); | |
26 | |
27 public: | |
28 static CompositorMutatorImpl* create(); | |
29 ~CompositorMutatorImpl() override; | |
30 | |
31 DEFINE_INLINE_TRACE() | |
32 { | |
33 CompositorMutator::trace(visitor); | |
34 visitor->trace(m_proxyClients); | |
35 } | |
36 | |
37 // CompositorMutator implementation. | |
38 bool mutate(double monotonicTimeNow) override; | |
39 | |
40 void registerProxyClient(CompositorProxyClientImpl*); | |
41 void unregisterProxyClient(CompositorProxyClientImpl*); | |
42 | |
43 void setNeedsMutate(); | |
44 | |
45 void setClient(CompositorMutatorClient* client) { m_client = client; } | |
46 CustomCompositorAnimationManager* animationManager() { return m_animationMan ager.get(); } | |
47 | |
48 private: | |
49 CompositorMutatorImpl(); | |
50 | |
51 using ProxyClients = HeapHashSet<WeakMember<CompositorProxyClientImpl>>; | |
52 ProxyClients m_proxyClients; | |
53 | |
54 OwnPtr<CustomCompositorAnimationManager> m_animationManager; | |
55 CompositorMutatorClient* m_client; | |
56 }; | |
57 | |
58 } // namespace blink | |
59 | |
60 #endif // CompositorMutatorImpl_h | |
OLD | NEW |