Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: cc/layers/layer_serializer.h

Issue 1398443008: Add support for (de)serializing cc::Layer hierarchy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@review-1394353002
Patch Set: Fixed CC_EXPORT Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_serializer.h
diff --git a/cc/layers/layer_serializer.h b/cc/layers/layer_serializer.h
new file mode 100644
index 0000000000000000000000000000000000000000..f646505782953d538a9132070693ade09096fff3
--- /dev/null
+++ b/cc/layers/layer_serializer.h
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_LAYERS_LAYER_SERIALIZER_H_
+#define CC_LAYERS_LAYER_SERIALIZER_H_
+
+#include "base/macros.h"
+#include "cc/base/cc_export.h"
+#include "cc/layers/layer.h"
+
+namespace cc {
+
+namespace proto {
+class LayerNode;
+class LayerUpdate;
+}
+
+// A class to faciliate serialization of a Layer tree.
+class CC_EXPORT LayerSerializer {
+ public:
+ // Starting at |root_layer|, serializes the layer hierarchy into the
+ // proto::LayerNode.
+ static void SerializeLayerHierarchy(const scoped_refptr<Layer> root_layer,
+ proto::LayerNode* root_node);
+
+ private:
+ LayerSerializer() {}
+ virtual ~LayerSerializer() {}
+
+ DISALLOW_COPY_AND_ASSIGN(LayerSerializer);
+};
+
+} // namespace cc
+
+#endif // CC_LAYERS_LAYER_SERIALIZER_H_

Powered by Google App Engine
This is Rietveld 408576698