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

Unified Diff: cc/proto/gfx_conversions.h

Issue 1417963011: Added serialization to protobufs for property trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 1 month 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/proto/gfx_conversions.h
diff --git a/cc/proto/gfx_conversions.h b/cc/proto/gfx_conversions.h
index 5b5c31551869f806406a28c20e2c7ca09c6d1a2d..8c5e84e46eb4e82025b55bad8d3dbe5df8e50e7d 100644
--- a/cc/proto/gfx_conversions.h
+++ b/cc/proto/gfx_conversions.h
@@ -12,9 +12,11 @@ class Point;
class PointF;
class Rect;
class RectF;
+class ScrollOffset;
class Size;
class SizeF;
class Transform;
+class Vector2dF;
}
namespace cc {
@@ -24,9 +26,11 @@ class Point;
class PointF;
class Rect;
class RectF;
+class ScrollOffset;
class Size;
class SizeF;
class Transform;
+class Vector2dF;
}
// TODO(dtrainor): Move these to a class and make them static
@@ -53,6 +57,15 @@ CC_EXPORT void TransformToProto(const gfx::Transform& transform,
proto::Transform* proto);
CC_EXPORT gfx::Transform ProtoToTransform(const proto::Transform& proto);
+CC_EXPORT void Vector2dFToProto(const gfx::Vector2dF& vector,
+ proto::Vector2dF* proto);
+CC_EXPORT gfx::Vector2dF ProtoToVector2dF(const proto::Vector2dF& proto);
+
+CC_EXPORT void ScrollOffsetToProto(const gfx::ScrollOffset& scroll_offset,
+ proto::ScrollOffset* proto);
+CC_EXPORT gfx::ScrollOffset ProtoToScrollOffset(
+ const proto::ScrollOffset& proto);
+
} // namespace cc
#endif // CC_PROTO_GFX_CONVERSIONS_H_
« no previous file with comments | « cc/proto/BUILD.gn ('k') | cc/proto/gfx_conversions.cc » ('j') | cc/proto/property_tree.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698