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 PointF; |
| 13 class Rect; |
| 14 class RectF; |
| 15 class Size; |
| 16 class SizeF; |
| 17 class Transform; |
| 18 } |
| 19 |
| 20 namespace cc { |
| 21 |
| 22 namespace proto { |
| 23 class Point; |
| 24 class PointF; |
| 25 class Rect; |
| 26 class RectF; |
| 27 class Size; |
| 28 class SizeF; |
| 29 class Transform; |
| 30 } |
| 31 |
| 32 CC_EXPORT void PointToProto(const gfx::Point& point, proto::Point* proto); |
| 33 CC_EXPORT gfx::Point ProtoToPoint(const proto::Point& proto); |
| 34 |
| 35 CC_EXPORT void PointFToProto(const gfx::PointF& point, proto::PointF* proto); |
| 36 CC_EXPORT gfx::PointF ProtoToPointF(const proto::PointF& proto); |
| 37 |
| 38 CC_EXPORT void RectToProto(const gfx::Rect& rect, proto::Rect* proto); |
| 39 CC_EXPORT gfx::Rect ProtoToRect(const proto::Rect& proto); |
| 40 |
| 41 CC_EXPORT void RectFToProto(const gfx::RectF& rect, proto::RectF* proto); |
| 42 CC_EXPORT gfx::RectF ProtoToRectF(const proto::RectF& proto); |
| 43 |
| 44 CC_EXPORT void SizeToProto(const gfx::Size& size, proto::Size* proto); |
| 45 CC_EXPORT gfx::Size ProtoToSize(const proto::Size& proto); |
| 46 |
| 47 CC_EXPORT void SizeFToProto(const gfx::SizeF& size, proto::SizeF* proto); |
| 48 CC_EXPORT gfx::SizeF ProtoToSizeF(const proto::SizeF& proto); |
| 49 |
| 50 CC_EXPORT void TransformToProto(const gfx::Transform& transform, |
| 51 proto::Transform* proto); |
| 52 CC_EXPORT gfx::Transform ProtoToTransform(const proto::Transform& proto); |
| 53 |
| 54 } // namespace cc |
| 55 |
| 56 #endif // CC_PROTO_GFX_CONVERSIONS_H_ |
OLD | NEW |