Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: cc/trees/tree_synchronizer.cc

Issue 2905533002: cc : Store surface layer ids on LayerTreeHost and push them at commit (Closed)
Patch Set: comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698