summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_unittest_serialization.cc
Commit message (Collapse)AuthorAgeFilesLines
* cc: Fix LayerTree deserialization for commit.khushalsagar2016-03-231-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we receive a commit protobuf from the engine, we collect all the existing Layers in a map and proceed with deserializing the new LayerTree in the commit protobuf, re-using any existing Layers if possible. When deserializing a Layer, Layer::FromLayerNodeProto creates a copy of the existing children, in order to clear the parent pointers for these layers, if they have now been added to the children of another layer. However, since we only traverse the layers from the updated LayerTree during deserialization, if a Layer has been destroyed on the engine, it will not be traversed during the derserialization step, and will still hold a reference to all its children. When this Layer is being destroyed on the client, it will call Layer::RemoveFromParent for all its children, which may now have been added to the children list of a different Layer. This patch clears all the properties that are sent with a Layer Hierarchy update in Layer::ClearLayerHierarchyPropertiesForDeserializationAndAddToMap, which is run for the existing LayerTree before parsing the new LayerTree from the commit protobuf. BUG=590102 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1804703004 Cr-Commit-Position: refs/heads/master@{#382953}
* cc : Make tree synchronization independent of layer tree hierarchy (2)jaydasika2016-03-211-0/+7
| | | | | | | | | | | | | | | | | This CL : * Stores layers that need to push properties in LayerTreeHost(layer_set) * Deletes bools needs_push_properties and dependants_needs_push_properties from Layer. * Iterate the layer_set tp push properties during commit. * Changes what layers are serialized (Both dirty layers and their ancestors are serialized currently. With this CL, only dirty layers serialize). BUG=568874 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1808373002 Cr-Commit-Position: refs/heads/master@{#382379}
* CC Animation: Erase cc::LayerSettings everywhere.loyso2016-03-141-27/+17
| | | | | | | | | | | Also, erase LayerTreeSettings::use_compositor_animation_timelines flag. BUG=575041 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1783613004 Cr-Commit-Position: refs/heads/master@{#380914}
* Move LayerType to LayerNode::Typenyquist2016-02-191-1/+1
| | | | | | | | | | | | | | The LayerType was accidentally put into the cc::proto namespace instead of being a part of LayerNode. Note: This is a breaking change for the protobufs. BUG=None CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1689863003 Cr-Commit-Position: refs/heads/master@{#376308}
* Ensure Layers have valid sequence numbers for PropertyTreesnyquist2016-01-271-0/+9
| | | | | | | | | | | | | | | | | | Calling Layer::set_property_tree_sequence_number() does not set the flag that a commit is needed, which means it can quickly get out of date for layers that are not updated for other reasons when the Layer is (de)serialized. This CL makes the LayerTreeHost forcefully set the sequence number to the same value as the current PropertyTrees.sequence_number, since all valid in the hierarchy is valid at that point. BUG=577352, 538710 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1584653004 Cr-Commit-Position: refs/heads/master@{#371654}
* Add support for (de)serializing HeadsUpDisplayLayernyquist2016-01-161-0/+13
| | | | | | | | | | | | | | | | | | | | They LayerTreeHost has a HUD-layer as a member, and as part of the CL for adding support for (de)serializing the LayerTreeHost, the test code incorrectly creates a cc:Layer instead of a cc:HeadsUpDisplayLayer, and this is not checked. The Linux CFI bot luckily caught this error, so this CL fixes the error by adding support for the layer type. The HUD layer has no special members, but do have some special logic for drawing, so only the type needed to be serialized. BUG=577972 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1581693010 Cr-Commit-Position: refs/heads/master@{#369916}
* Add support for (de)serializing LayerTreeHost.nyquist2016-01-141-0/+313
As part of the cc commit flow, we need to be able to serialize the LayerTreeHost. Not all state is necessary to serialize to be able to do a commit on the client side, so only some members are included in the proto. BUG=561210 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1519293002 Cr-Commit-Position: refs/heads/master@{#369450}