[go: nahoru, domu]

Add support for (de)serializing cc::Layer hierarchy.

This CL adds a protocol buffer for serializing the Layer hierarchy,
including the mask and replica layers. This will be used whenever the
hierarchy has changed and needs to be sent to the client.

Given that the protocol still is in flux, and for good measure, all
fields in the protocol buffer are marked as optional, even the
currently required fields.

When a hierarchy is serialized, the whole hierarchy is serialized from
the root node, instead of just the changed subtree.

Most of the logic lives in the Layer class, but the possibility to
change the root of the hierarchy is extracted out to a
LayerProtoConverter. It also has functionality to build up a map of
the current tree, which will also be used during property
deserialization.

The next CL will deal with serializing the properties:
https://codereview.chromium.org/1423523002/

BUG=538710
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1398443008

Cr-Commit-Position: refs/heads/master@{#358424}
11 files changed