OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" | 5 #include "mojo/converters/geometry_type_converters.h" |
6 | 6 |
7 namespace mojo { | 7 namespace mojo { |
8 | 8 |
9 // static | 9 // static |
10 PointPtr TypeConverter<PointPtr, gfx::Point>::Convert(const gfx::Point& input) { | 10 PointPtr TypeConverter<PointPtr, gfx::Point>::Convert(const gfx::Point& input) { |
11 PointPtr point(Point::New()); | 11 PointPtr point(Point::New()); |
12 point->x = input.x(); | 12 point->x = input.x(); |
13 point->y = input.y(); | 13 point->y = input.y(); |
14 return point.Pass(); | 14 return point.Pass(); |
15 } | 15 } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 gfx::Transform TypeConverter<gfx::Transform, TransformPtr>::Convert( | 103 gfx::Transform TypeConverter<gfx::Transform, TransformPtr>::Convert( |
104 const TransformPtr& input) { | 104 const TransformPtr& input) { |
105 if (input.is_null()) | 105 if (input.is_null()) |
106 return gfx::Transform(); | 106 return gfx::Transform(); |
107 gfx::Transform transform(gfx::Transform::kSkipInitialization); | 107 gfx::Transform transform(gfx::Transform::kSkipInitialization); |
108 transform.matrix().setRowMajorf(&input->matrix.storage()[0]); | 108 transform.matrix().setRowMajorf(&input->matrix.storage()[0]); |
109 return transform; | 109 return transform; |
110 } | 110 } |
111 | 111 |
112 } // namespace mojo | 112 } // namespace mojo |
OLD | NEW |