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 "wtf/HashSet.h" |
| 10 #include "wtf/Noncopyable.h" |
| 11 #include "wtf/OwnPtr.h" |
| 12 #include "wtf/PassOwnPtr.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class CompositorProxy; |
| 17 class CompositorProxyClient; |
| 18 class CompositorProxyClientImpl; |
| 19 class CompositorWorkerGlobalScope; |
| 20 class CompositorMutatorClient; |
| 21 class WebWaitableEvent; |
| 22 |
| 23 class CompositorMutatorImpl final : public CompositorMutator { |
| 24 WTF_MAKE_NONCOPYABLE(CompositorMutatorImpl); |
| 25 |
| 26 public: |
| 27 static PassOwnPtr<CompositorMutatorImpl> create(); |
| 28 ~CompositorMutatorImpl() override; |
| 29 |
| 30 // CompositorMutator implementation. |
| 31 bool mutate(double timeNow, CompositorMutableStateProvider* state) override; |
| 32 |
| 33 void registerClient(CompositorProxyClientImpl*); |
| 34 void unregisterClient(CompositorProxyClientImpl*); |
| 35 |
| 36 CompositorProxyClient* createCompositorProxyClient(); |
| 37 CompositorMutatorClient* client() { return m_client.get(); } |
| 38 |
| 39 void setNeedsMutate(); |
| 40 |
| 41 private: |
| 42 CompositorMutatorImpl(); |
| 43 |
| 44 typedef HashSet<CompositorProxyClientImpl*> Clients; |
| 45 Clients m_clients; |
| 46 |
| 47 OwnPtr<CompositorMutatorClient> m_client; |
| 48 }; |
| 49 |
| 50 } // namespace blink |
| 51 |
| 52 #endif // CompositorMutatorImpl_h |
OLD | NEW |