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 #include "platform/graphics/CompositorMutatorClient.h" | 5 #include "platform/graphics/CompositorMutatorClient.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "base/bind.h" | 8 #include "base/bind.h" |
8 #include "base/callback.h" | 9 #include "base/callback.h" |
9 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
10 #include "cc/trees/layer_tree_impl.h" | 11 #include "cc/trees/layer_tree_impl.h" |
11 #include "platform/graphics/CompositorMutableStateProvider.h" | 12 #include "platform/graphics/CompositorMutableStateProvider.h" |
12 #include "platform/graphics/CompositorMutation.h" | 13 #include "platform/graphics/CompositorMutation.h" |
13 #include "platform/graphics/CompositorMutationsTarget.h" | 14 #include "platform/graphics/CompositorMutationsTarget.h" |
14 #include "platform/graphics/CompositorMutator.h" | 15 #include "platform/graphics/CompositorMutator.h" |
15 #include "wtf/PtrUtil.h" | 16 #include "wtf/PtrUtil.h" |
16 #include <memory> | |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 CompositorMutatorClient::CompositorMutatorClient( | 20 CompositorMutatorClient::CompositorMutatorClient( |
21 CompositorMutator* mutator, | 21 CompositorMutator* mutator, |
22 CompositorMutationsTarget* mutationsTarget) | 22 CompositorMutationsTarget* mutationsTarget) |
23 : m_client(nullptr), | 23 : m_client(nullptr), |
24 m_mutationsTarget(mutationsTarget), | 24 m_mutationsTarget(mutationsTarget), |
25 m_mutator(mutator), | 25 m_mutator(mutator), |
26 m_mutations(nullptr) { | 26 m_mutations(nullptr) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 TRACE_EVENT0("compositor-worker", "CompositorMutatorClient::setNeedsMutate"); | 65 TRACE_EVENT0("compositor-worker", "CompositorMutatorClient::setNeedsMutate"); |
66 m_client->SetNeedsMutate(); | 66 m_client->SetNeedsMutate(); |
67 } | 67 } |
68 | 68 |
69 void CompositorMutatorClient::setMutationsForTesting( | 69 void CompositorMutatorClient::setMutationsForTesting( |
70 std::unique_ptr<CompositorMutations> mutations) { | 70 std::unique_ptr<CompositorMutations> mutations) { |
71 m_mutations = std::move(mutations); | 71 m_mutations = std::move(mutations); |
72 } | 72 } |
73 | 73 |
74 } // namespace blink | 74 } // namespace blink |
OLD | NEW |