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

Side by Side Diff: third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: Remove unnecessary PLATFORM_EXPORT Created 3 years, 10 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
(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 AnimationWorkletProxyClientImpl_h
6 #define AnimationWorkletProxyClientImpl_h
7
8 #include "core/dom/AnimationWorkletProxyClient.h"
9 #include "platform/heap/Handle.h"
10 #include "web/CompositorAnimator.h"
11 #include "wtf/Noncopyable.h"
12
13 namespace blink {
14
15 class CompositorMutatorImpl;
16
17 // Mediates between one Animator and the associated CompositorMutatorImpl. There
18 // is one AnimationWorkletProxyClientImpl per Animator but there may be multiple
19 // for a given mutator and animatorWorklet.
20 //
21 // This is constructed on the main thread but it is used in the worklet backing
22 // thread i.e., compositor thread.
23 class AnimationWorkletProxyClientImpl final
24 : public AnimationWorkletProxyClient,
25 public CompositorAnimator {
26 WTF_MAKE_NONCOPYABLE(AnimationWorkletProxyClientImpl);
27 USING_GARBAGE_COLLECTED_MIXIN(AnimationWorkletProxyClientImpl);
28
29 public:
30 explicit AnimationWorkletProxyClientImpl(CompositorMutatorImpl*);
31 DECLARE_VIRTUAL_TRACE();
32
33 // CompositorAnimator:
34 // This method is invoked in compositor thread
35 bool mutate(double monotonicTimeNow,
36 CompositorMutableStateProvider*) override;
37
38 // CompositorProxyClient:
39 void registerCompositorProxy(CompositorProxy*) override;
40 void unregisterCompositorProxy(CompositorProxy*) override;
41
42 private:
43 CrossThreadPersistent<CompositorMutatorImpl> m_mutator;
44 HeapHashSet<WeakMember<CompositorProxy>> m_proxies;
45 };
46
47 } // namespace blink
48
49 #endif // AnimationWorkletProxyClientImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698