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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/tree_synchronizer.cc
diff --git a/cc/trees/tree_synchronizer.cc b/cc/trees/tree_synchronizer.cc
index 87efee06cab3859b3382d1fbd7e7c8d6e07037b5..02c5250d0392274aaca2a6dd710f2b5f5b128b49 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -132,12 +132,24 @@ void TreeSynchronizer::PushLayerProperties(LayerTreeImpl* pending_tree,
LayerTreeImpl* active_tree) {
PushLayerPropertiesInternal(pending_tree->LayersThatShouldPushProperties(),
active_tree);
+ 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.
+ active_tree->ClearSurfaceLayerIds();
+ active_tree->SetSurfaceLayerIds(pending_tree->SurfaceLayerIds());
+ // Reset for next update
+ pending_tree->set_needs_surface_ids_sync(false);
+ }
}
void TreeSynchronizer::PushLayerProperties(LayerTreeHost* host_tree,
LayerTreeImpl* impl_tree) {
PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(),
impl_tree);
+ 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.
+ impl_tree->ClearSurfaceLayerIds();
+ impl_tree->SetSurfaceLayerIds(host_tree->SurfaceLayerIds());
+ // Reset for next update
+ host_tree->set_needs_surface_ids_sync(false);
+ }
}
} // namespace cc
« 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