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()) { |