| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CompositorMutatorClient_h | 5 #ifndef CompositorMutatorClient_h |
| 6 #define CompositorMutatorClient_h | 6 #define CompositorMutatorClient_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "public/platform/WebCompositorMutatorClient.h" | 9 #include "public/platform/WebCompositorMutatorClient.h" |
| 10 #include "wtf/OwnPtr.h" | 10 #include "wtf/OwnPtr.h" |
| 11 #include "wtf/PassOwnPtr.h" | 11 #include "wtf/PassOwnPtr.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class CompositorMutator; |
| 15 struct CompositorMutations; | 16 struct CompositorMutations; |
| 16 class CompositorMutationsTarget; | 17 class CompositorMutationsTarget; |
| 17 | 18 |
| 18 class PLATFORM_EXPORT CompositorMutatorClient : public WebCompositorMutatorClien
t { | 19 class PLATFORM_EXPORT CompositorMutatorClient : public WebCompositorMutatorClien
t { |
| 19 public: | 20 public: |
| 20 CompositorMutatorClient(CompositorMutationsTarget*); | 21 CompositorMutatorClient(CompositorMutator*, CompositorMutationsTarget*); |
| 21 virtual ~CompositorMutatorClient(); | 22 virtual ~CompositorMutatorClient(); |
| 22 | 23 |
| 24 void setNeedsMutate(); |
| 25 |
| 23 // cc::LayerTreeMutator | 26 // cc::LayerTreeMutator |
| 27 bool Mutate(base::TimeTicks timeNow) override; |
| 28 void SetClient(cc::LayerTreeMutatorClient*) override; |
| 24 base::Closure TakeMutations() override; | 29 base::Closure TakeMutations() override; |
| 25 | 30 |
| 26 void setMutationsForTesting(PassOwnPtr<CompositorMutations>); | 31 void setMutationsForTesting(PassOwnPtr<CompositorMutations>); |
| 27 private: | 32 private: |
| 33 cc::LayerTreeMutatorClient* m_client; |
| 34 CompositorMutator* m_mutator; |
| 28 CompositorMutationsTarget* m_mutationsTarget; | 35 CompositorMutationsTarget* m_mutationsTarget; |
| 29 OwnPtr<CompositorMutations> m_mutations; | 36 OwnPtr<CompositorMutations> m_mutations; |
| 30 }; | 37 }; |
| 31 | 38 |
| 32 } // namespace blink | 39 } // namespace blink |
| 33 | 40 |
| 34 #endif // CompositorMutatorClient_h | 41 #endif // CompositorMutatorClient_h |
| OLD | NEW |