| Index: cc/layers/layer_proto_converter.cc
|
| diff --git a/cc/layers/layer_proto_converter.cc b/cc/layers/layer_proto_converter.cc
|
| index 19215c9f92eed97ed73c612baee5c553c9a2b0fd..6cdd76eaeaea84603ca2e1276ea607bdbb2aeb55 100644
|
| --- a/cc/layers/layer_proto_converter.cc
|
| +++ b/cc/layers/layer_proto_converter.cc
|
| @@ -48,9 +48,11 @@ scoped_refptr<Layer> LayerProtoConverter::DeserializeLayerHierarchy(
|
|
|
| // static
|
| void LayerProtoConverter::SerializeLayerProperties(
|
| - Layer* root_layer,
|
| + LayerTreeHost* host,
|
| proto::LayerUpdate* layer_update) {
|
| - RecursivelySerializeLayerProperties(root_layer, layer_update);
|
| + for (auto layer : host->LayersThatShouldPushProperties())
|
| + layer->ToLayerPropertiesProto(layer_update);
|
| + host->LayersThatShouldPushProperties().clear();
|
| }
|
|
|
| // static
|
| @@ -73,23 +75,6 @@ void LayerProtoConverter::DeserializeLayerProperties(
|
| }
|
|
|
| // static
|
| -void LayerProtoConverter::RecursivelySerializeLayerProperties(
|
| - Layer* layer,
|
| - proto::LayerUpdate* layer_update) {
|
| - bool serialize_descendants = layer->ToLayerPropertiesProto(layer_update);
|
| - if (!serialize_descendants)
|
| - return;
|
| -
|
| - for (const auto& child : layer->children()) {
|
| - RecursivelySerializeLayerProperties(child.get(), layer_update);
|
| - }
|
| - if (layer->mask_layer())
|
| - RecursivelySerializeLayerProperties(layer->mask_layer(), layer_update);
|
| - if (layer->replica_layer())
|
| - RecursivelySerializeLayerProperties(layer->replica_layer(), layer_update);
|
| -}
|
| -
|
| -// static
|
| void LayerProtoConverter::RecursivelyFindAllLayers(
|
| const scoped_refptr<Layer>& layer,
|
| LayerIdMap* layer_id_map) {
|
|
|