OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_LAYERS_LAYER_SERIALIZER_H_ |
| 6 #define CC_LAYERS_LAYER_SERIALIZER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/layers/layer.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 namespace proto { |
| 15 class LayerNode; |
| 16 class LayerUpdate; |
| 17 } |
| 18 |
| 19 // A class to faciliate serialization of a Layer tree. |
| 20 class CC_EXPORT LayerSerializer { |
| 21 public: |
| 22 // Starting at |root_layer|, serializes the layer hierarchy into the |
| 23 // proto::LayerNode. |
| 24 static void SerializeLayerHierarchy(const scoped_refptr<Layer> root_layer, |
| 25 proto::LayerNode* root_node); |
| 26 |
| 27 private: |
| 28 LayerSerializer() {} |
| 29 virtual ~LayerSerializer() {} |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(LayerSerializer); |
| 32 }; |
| 33 |
| 34 } // namespace cc |
| 35 |
| 36 #endif // CC_LAYERS_LAYER_SERIALIZER_H_ |
OLD | NEW |