Index: cc/layers/layer_proto_converter.cc |
diff --git a/cc/layers/layer_proto_converter.cc b/cc/layers/layer_proto_converter.cc |
index 921028fecbeb59d9766b2c1c7a8bde48d0bd2ffe..27c76ae38d60188aded9d550552229ee7bd0fb09 100644 |
--- a/cc/layers/layer_proto_converter.cc |
+++ b/cc/layers/layer_proto_converter.cc |
@@ -32,7 +32,7 @@ scoped_refptr<Layer> LayerProtoConverter::DeserializeLayerHierarchy( |
const proto::LayerNode& root_node) { |
LayerIdMap layer_id_map; |
if (existing_root) |
- RecursivelyFindAllLayers(existing_root, &layer_id_map); |
+ RecursivelyFindAllLayers(existing_root.get(), &layer_id_map); |
scoped_refptr<Layer> new_root = existing_root; |
if (!existing_root || |
@@ -89,11 +89,10 @@ void LayerProtoConverter::RecursivelySerializeLayerProperties( |
} |
// static |
-void LayerProtoConverter::RecursivelyFindAllLayers( |
- const scoped_refptr<Layer>& layer, |
- LayerIdMap* layer_id_map) { |
+void LayerProtoConverter::RecursivelyFindAllLayers(Layer* root_layer, |
+ LayerIdMap* layer_id_map) { |
LayerTreeHostCommon::CallFunctionForSubtree( |
- layer.get(), |
+ root_layer, |
[layer_id_map](Layer* layer) { (*layer_id_map)[layer->id()] = layer; }); |
} |