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

Unified Diff: cc/layers/layer_proto_converter.cc

Issue 1803863003: cc: Remove some unnecessary const scoped_refptr&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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; });
danakj 2016/03/16 00:08:15 https://code.google.com/p/chromium/codesearch#chro
}

Powered by Google App Engine
This is Rietveld 408576698