Chromium Code Reviews| Index: third_party/WebKit/Source/web/CompositorMutatorImpl.h |
| diff --git a/third_party/WebKit/Source/web/CompositorMutatorImpl.h b/third_party/WebKit/Source/web/CompositorMutatorImpl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4fb3ddac024c26915be69e6c54c16883b826e5a2 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/web/CompositorMutatorImpl.h |
| @@ -0,0 +1,60 @@ |
| +// 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 CompositorMutatorImpl_h |
| +#define CompositorMutatorImpl_h |
| + |
| +#include "platform/graphics/CompositorMutator.h" |
| +#include "platform/heap/Handle.h" |
| +#include "platform/heap/HeapAllocator.h" |
| +#include "wtf/Noncopyable.h" |
| +#include "wtf/OwnPtr.h" |
| +#include "wtf/PassOwnPtr.h" |
| + |
| +namespace blink { |
| + |
| +class CompositorProxy; |
| +class CompositorProxyClientImpl; |
| +class CompositorWorkerGlobalScope; |
| +class CompositorMutatorClient; |
| +class CustomCompositorAnimationManager; |
| +class WaitableEvent; |
| + |
| +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.
|
| + WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl); |
| + |
| +public: |
| + static CompositorMutatorImpl* create(); |
| + ~CompositorMutatorImpl() override; |
| + |
| + DEFINE_INLINE_TRACE() |
| + { |
| + CompositorMutator::trace(visitor); |
| + visitor->trace(m_proxyClients); |
| + } |
| + |
| + // CompositorMutator implementation. |
| + bool mutate(double monotonicTimeNow) override; |
| + |
| + void registerProxyClient(CompositorProxyClientImpl*); |
| + void unregisterProxyClient(CompositorProxyClientImpl*); |
| + |
| + void setNeedsMutate(); |
| + |
| + void setClient(CompositorMutatorClient* client) { m_client = client; } |
| + CustomCompositorAnimationManager* animationManager() { return m_animationManager.get(); } |
| + |
| +private: |
| + CompositorMutatorImpl(); |
| + |
| + using ProxyClients = HeapHashSet<WeakMember<CompositorProxyClientImpl>>; |
| + ProxyClients m_proxyClients; |
| + |
| + OwnPtr<CustomCompositorAnimationManager> m_animationManager; |
| + CompositorMutatorClient* m_client; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // CompositorMutatorImpl_h |