Chromium Code Reviews| 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 "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "public/platform/WebCompositorMutatorClient.h" | 10 #include "public/platform/WebCompositorMutatorClient.h" |
| 11 #include "wtf/OwnPtr.h" | 11 #include "wtf/OwnPtr.h" |
| 12 #include "wtf/PassOwnPtr.h" | 12 #include "wtf/PassOwnPtr.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class CompositorMutator; | 16 class CompositorMutator; |
| 17 struct CompositorMutations; | 17 struct CompositorMutations; |
| 18 class CompositorMutationsTarget; | 18 class CompositorMutationsTarget; |
| 19 | 19 |
| 20 class PLATFORM_EXPORT CompositorMutatorClient : public WebCompositorMutatorClien t { | 20 class PLATFORM_EXPORT CompositorMutatorClient : public WebCompositorMutatorClien t { |
| 21 public: | 21 public: |
| 22 CompositorMutatorClient(CompositorMutator*, CompositorMutationsTarget*); | 22 CompositorMutatorClient(CompositorMutator*, CompositorMutationsTarget*); |
| 23 virtual ~CompositorMutatorClient(); | 23 virtual ~CompositorMutatorClient(); |
| 24 | 24 |
| 25 void setNeedsMutate(); | 25 void setNeedsMutate(); |
| 26 | 26 |
| 27 // cc::LayerTreeMutator | 27 // cc::LayerTreeMutator |
| 28 bool Mutate(base::TimeTicks monotonicTime) override; | 28 bool Mutate(base::TimeTicks monotonicTime, cc::LayerTreeImpl* state) overrid e; |
|
jbroman
2016/06/08 14:59:38
"state" seems an odd name for a LayerTreeImpl* (he
majidvp
2016/06/08 21:50:09
This is following the convention used in Composito
| |
| 29 void SetClient(cc::LayerTreeMutatorClient*) override; | 29 void SetClient(cc::LayerTreeMutatorClient*) override; |
| 30 base::Closure TakeMutations() override; | 30 base::Closure TakeMutations() override; |
| 31 | 31 |
| 32 CompositorMutator* mutator() { return m_mutator.get(); } | 32 CompositorMutator* mutator() { return m_mutator.get(); } |
| 33 | 33 |
| 34 void setMutationsForTesting(PassOwnPtr<CompositorMutations>); | 34 void setMutationsForTesting(PassOwnPtr<CompositorMutations>); |
| 35 private: | 35 private: |
| 36 cc::LayerTreeMutatorClient* m_client; | 36 cc::LayerTreeMutatorClient* m_client; |
| 37 CompositorMutationsTarget* m_mutationsTarget; | 37 CompositorMutationsTarget* m_mutationsTarget; |
| 38 Persistent<CompositorMutator> m_mutator; | 38 Persistent<CompositorMutator> m_mutator; |
| 39 OwnPtr<CompositorMutations> m_mutations; | 39 OwnPtr<CompositorMutations> m_mutations; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace blink | 42 } // namespace blink |
| 43 | 43 |
| 44 #endif // CompositorMutatorClient_h | 44 #endif // CompositorMutatorClient_h |
| OLD | NEW |