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

Side by Side Diff: mojo/converters/geometry_type_converters.cc

Issue 640893003: Move mojo/services/public/cpp TypeConverters to mojo/converters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN. Created 6 years, 2 months 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698