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

Unified Diff: cc/tree_synchronizer.cc

Issue 11472021: cc: Pass LayerTreeHostImpl to LayerImpl constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« no previous file with comments | « cc/tree_synchronizer.h ('k') | cc/tree_synchronizer_unittest.cc » ('j') | 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..863edef53e95afd0635e89e934a8ebcf18615a3c 100644
--- a/cc/tree_synchronizer.cc
+++ b/cc/tree_synchronizer.cc
@@ -44,12 +44,12 @@ void TreeSynchronizer::collectExistingLayerImplRecursive(ScopedPtrLayerImplMap&
oldLayers.set(id, layerImpl.Pass());
}
-scoped_ptr<LayerImpl> TreeSynchronizer::reuseOrCreateLayerImpl(RawPtrLayerImplMap& newLayers, ScopedPtrLayerImplMap& oldLayers, Layer* layer)
+scoped_ptr<LayerImpl> TreeSynchronizer::reuseOrCreateLayerImpl(RawPtrLayerImplMap& newLayers, ScopedPtrLayerImplMap& oldLayers, Layer* layer, LayerTreeHostImpl* hostImpl)
{
scoped_ptr<LayerImpl> layerImpl = oldLayers.take(layer->id());
if (!layerImpl)
- layerImpl = layer->createLayerImpl();
+ layerImpl = layer->createLayerImpl(hostImpl);
newLayers[layer->id()] = layerImpl.get();
return layerImpl.Pass();
@@ -60,7 +60,7 @@ scoped_ptr<LayerImpl> TreeSynchronizer::synchronizeTreeRecursive(RawPtrLayerImpl
if (!layer)
return scoped_ptr<LayerImpl>();
- scoped_ptr<LayerImpl> layerImpl = reuseOrCreateLayerImpl(newLayers, oldLayers, layer);
+ scoped_ptr<LayerImpl> layerImpl = reuseOrCreateLayerImpl(newLayers, oldLayers, layer, hostImpl);
layerImpl->clearChildList();
const std::vector<scoped_refptr<Layer> >& children = layer->children();
@@ -71,7 +71,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()) {
« no previous file with comments | « cc/tree_synchronizer.h ('k') | cc/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698