| 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" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 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(std::unique_ptr<CompositorMutations>); | 34 void setMutationsForTesting(std::unique_ptr<CompositorMutations>); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 cc::LayerTreeMutatorClient* m_client; | 37 cc::LayerTreeMutatorClient* m_client; |
| 38 CompositorMutationsTarget* m_mutationsTarget; | 38 CompositorMutationsTarget* m_mutationsTarget; |
| 39 Persistent<CompositorMutator> m_mutator; | 39 // Accessed by main and compositor threads. |
| 40 CrossThreadPersistent<CompositorMutator> m_mutator; |
| 40 std::unique_ptr<CompositorMutations> m_mutations; | 41 std::unique_ptr<CompositorMutations> m_mutations; |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 } // namespace blink | 44 } // namespace blink |
| 44 | 45 |
| 45 #endif // CompositorMutatorClient_h | 46 #endif // CompositorMutatorClient_h |
| OLD | NEW |