Chromium Code Reviews| Index: third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h |
| diff --git a/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h b/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..eec942b6cc350501a4c87bc555531f41dbe80406 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/web/AnimationWorkletProxyClientImpl.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2016 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 AnimationWorkletProxyClientImpl_h |
| +#define AnimationWorkletProxyClientImpl_h |
| + |
| +#include "core/dom/AnimationWorkletProxyClient.h" |
| +#include "platform/graphics/CompositorAnimator.h" |
| +#include "platform/heap/Handle.h" |
| +#include "wtf/Noncopyable.h" |
| + |
| +namespace blink { |
| + |
| +class CompositorMutatorImpl; |
| + |
| +// Mediates between one Animator and the associated CompositorMutatorImpl. There |
| +// is one AnimationWorkletProxyClientImpl per Animator but there may be multiple |
| +// for a given mutator and animatorWorklet. |
| +// |
| +// Should be accessed only on the compositor thread. |
|
dcheng
2016/11/28 21:17:31
This comment seems to be directly in opposition to
majidvp
2017/01/20 15:48:57
I clarified the comment. This is similar to a work
|
| +class AnimationWorkletProxyClientImpl final |
| + : public GarbageCollectedFinalized<AnimationWorkletProxyClientImpl>, |
| + public AnimationWorkletProxyClient, |
| + public CompositorAnimator { |
| + WTF_MAKE_NONCOPYABLE(AnimationWorkletProxyClientImpl); |
| + USING_GARBAGE_COLLECTED_MIXIN(AnimationWorkletProxyClientImpl); |
| + |
| + public: |
| + AnimationWorkletProxyClientImpl(CompositorMutatorImpl*); |
|
dcheng
2016/11/28 21:17:32
Nit: explicit
Or even better, add |CompositorMuta
|
| + DECLARE_VIRTUAL_TRACE(); |
| + |
| + // CompositorAnimator: |
| + bool mutate(double monotonicTimeNow, |
| + CompositorMutableStateProvider*) override; |
| + |
| + // CompositorProxyClient: |
| + void registerCompositorProxy(CompositorProxy*) override; |
| + void unregisterCompositorProxy(CompositorProxy*) override; |
| + |
| + private: |
| + CrossThreadPersistent<CompositorMutatorImpl> m_mutator; |
| + HeapHashSet<WeakMember<CompositorProxy>> m_proxies; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // AnimationWorkletProxyClientImpl_h |