OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/trees/tree_synchronizer.h" | 5 #include "cc/trees/tree_synchronizer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 LayerImpl* layer_impl = impl_tree->LayerById(layer->id()); | 125 LayerImpl* layer_impl = impl_tree->LayerById(layer->id()); |
126 DCHECK(layer_impl); | 126 DCHECK(layer_impl); |
127 layer->PushPropertiesTo(layer_impl); | 127 layer->PushPropertiesTo(layer_impl); |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 void TreeSynchronizer::PushLayerProperties(LayerTreeImpl* pending_tree, | 131 void TreeSynchronizer::PushLayerProperties(LayerTreeImpl* pending_tree, |
132 LayerTreeImpl* active_tree) { | 132 LayerTreeImpl* active_tree) { |
133 PushLayerPropertiesInternal(pending_tree->LayersThatShouldPushProperties(), | 133 PushLayerPropertiesInternal(pending_tree->LayersThatShouldPushProperties(), |
134 active_tree); | 134 active_tree); |
135 if (pending_tree->needs_surface_ids_sync()) { | |
enne (OOO)
2017/05/24 18:44:54
Should this be in LayerTreeImpl::PushPropertiesTo
jaydasika
2017/05/24 21:39:54
Done.
| |
136 active_tree->ClearSurfaceLayerIds(); | |
137 active_tree->SetSurfaceLayerIds(pending_tree->SurfaceLayerIds()); | |
138 // Reset for next update | |
139 pending_tree->set_needs_surface_ids_sync(false); | |
140 } | |
135 } | 141 } |
136 | 142 |
137 void TreeSynchronizer::PushLayerProperties(LayerTreeHost* host_tree, | 143 void TreeSynchronizer::PushLayerProperties(LayerTreeHost* host_tree, |
138 LayerTreeImpl* impl_tree) { | 144 LayerTreeImpl* impl_tree) { |
139 PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(), | 145 PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(), |
140 impl_tree); | 146 impl_tree); |
147 if (host_tree->needs_surface_ids_sync()) { | |
enne (OOO)
2017/05/24 18:44:54
Similarly, should this be in LayerTreeHost::Finish
jaydasika
2017/05/24 21:39:54
Done.
| |
148 impl_tree->ClearSurfaceLayerIds(); | |
149 impl_tree->SetSurfaceLayerIds(host_tree->SurfaceLayerIds()); | |
150 // Reset for next update | |
151 host_tree->set_needs_surface_ids_sync(false); | |
152 } | |
141 } | 153 } |
142 | 154 |
143 } // namespace cc | 155 } // namespace cc |
OLD | NEW |