| 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_PROTO_GFX_CONVERSIONS_H_ | |
| 6 #define CC_PROTO_GFX_CONVERSIONS_H_ | |
| 7 | |
| 8 #include "cc/base/cc_export.h" | |
| 9 | |
| 10 namespace gfx { | |
| 11 class Point; | |
| 12 class Point3F; | |
| 13 class PointF; | |
| 14 class Rect; | |
| 15 class RectF; | |
| 16 class ScrollOffset; | |
| 17 class Size; | |
| 18 class SizeF; | |
| 19 class Transform; | |
| 20 class Vector2d; | |
| 21 class Vector2dF; | |
| 22 } // namespace gfx | |
| 23 | |
| 24 namespace cc { | |
| 25 | |
| 26 namespace proto { | |
| 27 class Point; | |
| 28 class Point3F; | |
| 29 class PointF; | |
| 30 class Rect; | |
| 31 class RectF; | |
| 32 class ScrollOffset; | |
| 33 class Size; | |
| 34 class SizeF; | |
| 35 class Transform; | |
| 36 class Vector2d; | |
| 37 class Vector2dF; | |
| 38 } // namespace proto | |
| 39 | |
| 40 // TODO(dtrainor): Move these to a class and make them static | |
| 41 // (crbug.com/548432). | |
| 42 CC_EXPORT void PointToProto(const gfx::Point& point, proto::Point* proto); | |
| 43 CC_EXPORT gfx::Point ProtoToPoint(const proto::Point& proto); | |
| 44 | |
| 45 CC_EXPORT void Point3FToProto(const gfx::Point3F& point, proto::Point3F* proto); | |
| 46 CC_EXPORT gfx::Point3F ProtoToPoint3F(const proto::Point3F& proto); | |
| 47 | |
| 48 CC_EXPORT void PointFToProto(const gfx::PointF& point, proto::PointF* proto); | |
| 49 CC_EXPORT gfx::PointF ProtoToPointF(const proto::PointF& proto); | |
| 50 | |
| 51 CC_EXPORT void RectToProto(const gfx::Rect& rect, proto::Rect* proto); | |
| 52 CC_EXPORT gfx::Rect ProtoToRect(const proto::Rect& proto); | |
| 53 | |
| 54 CC_EXPORT void RectFToProto(const gfx::RectF& rect, proto::RectF* proto); | |
| 55 CC_EXPORT gfx::RectF ProtoToRectF(const proto::RectF& proto); | |
| 56 | |
| 57 CC_EXPORT void SizeToProto(const gfx::Size& size, proto::Size* proto); | |
| 58 CC_EXPORT gfx::Size ProtoToSize(const proto::Size& proto); | |
| 59 | |
| 60 CC_EXPORT void SizeFToProto(const gfx::SizeF& size, proto::SizeF* proto); | |
| 61 CC_EXPORT gfx::SizeF ProtoToSizeF(const proto::SizeF& proto); | |
| 62 | |
| 63 CC_EXPORT void TransformToProto(const gfx::Transform& transform, | |
| 64 proto::Transform* proto); | |
| 65 CC_EXPORT gfx::Transform ProtoToTransform(const proto::Transform& proto); | |
| 66 | |
| 67 CC_EXPORT void Vector2dFToProto(const gfx::Vector2dF& vector, | |
| 68 proto::Vector2dF* proto); | |
| 69 CC_EXPORT gfx::Vector2dF ProtoToVector2dF(const proto::Vector2dF& proto); | |
| 70 | |
| 71 CC_EXPORT void ScrollOffsetToProto(const gfx::ScrollOffset& scroll_offset, | |
| 72 proto::ScrollOffset* proto); | |
| 73 CC_EXPORT gfx::ScrollOffset ProtoToScrollOffset( | |
| 74 const proto::ScrollOffset& proto); | |
| 75 | |
| 76 CC_EXPORT void Vector2dToProto(const gfx::Vector2d& vector, | |
| 77 proto::Vector2d* proto); | |
| 78 CC_EXPORT gfx::Vector2d ProtoToVector2d(const proto::Vector2d& proto); | |
| 79 | |
| 80 } // namespace cc | |
| 81 | |
| 82 #endif // CC_PROTO_GFX_CONVERSIONS_H_ | |
| OLD | NEW |