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

Unified Diff: cc/tree_synchronizer.cc

Issue 11447028: cc: Split out calcDrawEtc from drawLayers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up unnecessary test changes Created 8 years 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/layer_tree_host_impl_unittest.cc ('K') | « cc/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tree_synchronizer.cc
diff --git a/cc/tree_synchronizer.cc b/cc/tree_synchronizer.cc
index 8dd94d14ace1e0926fa516bd6438888b7c011c38..17f62002f018a793be85e496526c8c4a28d7b98e 100644
--- a/cc/tree_synchronizer.cc
+++ b/cc/tree_synchronizer.cc
@@ -62,6 +62,10 @@ scoped_ptr<LayerImpl> TreeSynchronizer::synchronizeTreeRecursive(RawPtrLayerImpl
scoped_ptr<LayerImpl> layerImpl = reuseOrCreateLayerImpl(newLayers, oldLayers, layer);
+ // This call is not strictly necessary, but it prevents an extra tree
+ // recursion to set the host after synchronization in setRootLayer.
+ layerImpl->setLayerTreeHostImpl(hostImpl);
danakj 2012/12/06 19:12:10 Now the cc::Layer will be able to reach through an
enne (OOO) 2012/12/06 19:25:42 Is there something wrong with that?
danakj 2012/12/06 19:32:20 I'm not sure :) I know it's informed design choice
enne (OOO) 2012/12/06 19:34:09 It has?? I don't have any sense of what you're ref
danakj 2012/12/06 19:36:20 I'm trying to remember what it was, but at least o
enne (OOO) 2012/12/06 19:49:02 "I had to do something another way because I didn'
danakj 2012/12/06 19:51:56 I'm not really sure, I just wanted to make sure yo
+
layerImpl->clearChildList();
const std::vector<scoped_refptr<Layer> >& children = layer->children();
for (size_t i = 0; i < children.size(); ++i)
@@ -71,7 +75,6 @@ scoped_ptr<LayerImpl> TreeSynchronizer::synchronizeTreeRecursive(RawPtrLayerImpl
layerImpl->setReplicaLayer(synchronizeTreeRecursive(newLayers, oldLayers, layer->replicaLayer(), hostImpl));
layer->pushPropertiesTo(layerImpl.get());
- layerImpl->setLayerTreeHostImpl(hostImpl);
// Remove all dangling pointers. The pointers will be setup later in updateScrollbarLayerPointersRecursive phase
if (ScrollbarAnimationController* scrollbarController = layerImpl->scrollbarAnimationController()) {
« cc/layer_tree_host_impl_unittest.cc ('K') | « cc/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698