OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_PROTO_GFX_CONVERSIONS_H_ | 5 #ifndef CC_PROTO_GFX_CONVERSIONS_H_ |
6 #define CC_PROTO_GFX_CONVERSIONS_H_ | 6 #define CC_PROTO_GFX_CONVERSIONS_H_ |
7 | 7 |
8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace proto { | 22 namespace proto { |
23 class Point; | 23 class Point; |
24 class PointF; | 24 class PointF; |
25 class Rect; | 25 class Rect; |
26 class RectF; | 26 class RectF; |
27 class Size; | 27 class Size; |
28 class SizeF; | 28 class SizeF; |
29 class Transform; | 29 class Transform; |
30 } | 30 } |
31 | 31 |
| 32 // TODO(dtrainor): Move these to a class and make them static |
| 33 // (crbug.com/548432). |
32 CC_EXPORT void PointToProto(const gfx::Point& point, proto::Point* proto); | 34 CC_EXPORT void PointToProto(const gfx::Point& point, proto::Point* proto); |
33 CC_EXPORT gfx::Point ProtoToPoint(const proto::Point& proto); | 35 CC_EXPORT gfx::Point ProtoToPoint(const proto::Point& proto); |
34 | 36 |
35 CC_EXPORT void PointFToProto(const gfx::PointF& point, proto::PointF* proto); | 37 CC_EXPORT void PointFToProto(const gfx::PointF& point, proto::PointF* proto); |
36 CC_EXPORT gfx::PointF ProtoToPointF(const proto::PointF& proto); | 38 CC_EXPORT gfx::PointF ProtoToPointF(const proto::PointF& proto); |
37 | 39 |
38 CC_EXPORT void RectToProto(const gfx::Rect& rect, proto::Rect* proto); | 40 CC_EXPORT void RectToProto(const gfx::Rect& rect, proto::Rect* proto); |
39 CC_EXPORT gfx::Rect ProtoToRect(const proto::Rect& proto); | 41 CC_EXPORT gfx::Rect ProtoToRect(const proto::Rect& proto); |
40 | 42 |
41 CC_EXPORT void RectFToProto(const gfx::RectF& rect, proto::RectF* proto); | 43 CC_EXPORT void RectFToProto(const gfx::RectF& rect, proto::RectF* proto); |
42 CC_EXPORT gfx::RectF ProtoToRectF(const proto::RectF& proto); | 44 CC_EXPORT gfx::RectF ProtoToRectF(const proto::RectF& proto); |
43 | 45 |
44 CC_EXPORT void SizeToProto(const gfx::Size& size, proto::Size* proto); | 46 CC_EXPORT void SizeToProto(const gfx::Size& size, proto::Size* proto); |
45 CC_EXPORT gfx::Size ProtoToSize(const proto::Size& proto); | 47 CC_EXPORT gfx::Size ProtoToSize(const proto::Size& proto); |
46 | 48 |
47 CC_EXPORT void SizeFToProto(const gfx::SizeF& size, proto::SizeF* proto); | 49 CC_EXPORT void SizeFToProto(const gfx::SizeF& size, proto::SizeF* proto); |
48 CC_EXPORT gfx::SizeF ProtoToSizeF(const proto::SizeF& proto); | 50 CC_EXPORT gfx::SizeF ProtoToSizeF(const proto::SizeF& proto); |
49 | 51 |
50 CC_EXPORT void TransformToProto(const gfx::Transform& transform, | 52 CC_EXPORT void TransformToProto(const gfx::Transform& transform, |
51 proto::Transform* proto); | 53 proto::Transform* proto); |
52 CC_EXPORT gfx::Transform ProtoToTransform(const proto::Transform& proto); | 54 CC_EXPORT gfx::Transform ProtoToTransform(const proto::Transform& proto); |
53 | 55 |
54 } // namespace cc | 56 } // namespace cc |
55 | 57 |
56 #endif // CC_PROTO_GFX_CONVERSIONS_H_ | 58 #endif // CC_PROTO_GFX_CONVERSIONS_H_ |
OLD | NEW |