| Index: cc/layers/layer_proto_converter.cc
|
| diff --git a/cc/layers/layer_proto_converter.cc b/cc/layers/layer_proto_converter.cc
|
| index 27c76ae38d60188aded9d550552229ee7bd0fb09..626380dea1cb205b314b28b68b21ea2b217eaad6 100644
|
| --- a/cc/layers/layer_proto_converter.cc
|
| +++ b/cc/layers/layer_proto_converter.cc
|
| @@ -10,6 +10,7 @@
|
| #include "cc/layers/layer.h"
|
| #include "cc/layers/picture_layer.h"
|
| #include "cc/proto/layer.pb.h"
|
| +#include "cc/trees/layer_tree_host.h"
|
| #include "cc/trees/layer_tree_host_common.h"
|
| #include "cc/trees/layer_tree_settings.h"
|
|
|
| @@ -47,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
|
| @@ -72,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(Layer* root_layer,
|
| LayerIdMap* layer_id_map) {
|
| LayerTreeHostCommon::CallFunctionForSubtree(
|
|
|